x-engine-c v0.2.13
The C engine for x-lang
Loading...
Searching...
No Matches
comment.h File Reference

Comment token type for the tokenizer. More...

#include "x-type.h"

Go to the source code of this file.

Macros

#define X_TYPE_COMMENT_NAME   "COMMENT"
 
Type predicates
#define x_obj_type_iscomment(B, X)   x_obj_is_type((B), (X), X_TYPE_COMMENT_NAME)
 
Field accessors
#define x_commentval(X)   x_firststr((X))
 
#define x_commentlen(X)   x_lib_strlen(x_strval((X)))
 

Functions

x_obj_tx_type_comment_struct (x_obj_t *p_base, x_obj_t *p_args)
 
x_obj_tx_type_comment_register (x_obj_t *p_base, x_obj_t *p_args)
 

Detailed Description

Comment token type for the tokenizer.

Author
Jon Ruttan (jonru.nosp@m.ttan.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)

Macro Definition Documentation

◆ x_commentlen

#define x_commentlen (   X)    x_lib_strlen(x_strval((X)))

Length of comment text.

◆ x_commentval

#define x_commentval (   X)    x_firststr((X))

Comment text as C string.

◆ x_obj_type_iscomment

#define x_obj_type_iscomment (   B,
 
)    x_obj_is_type((B), (X), X_TYPE_COMMENT_NAME)

Test if object is a comment.

◆ X_TYPE_COMMENT_NAME

#define X_TYPE_COMMENT_NAME   "COMMENT"

Type name string.

Function Documentation

◆ x_type_comment_register()

x_obj_t * x_type_comment_register ( x_obj_t p_base,
x_obj_t p_args 
)

Register (or retrieve) the COMMENT type struct on p_base.

Register (or retrieve) the COMMENT type struct on p_base.

Parameters
p_basex_obj_t* – Base (execution context)
p_argsx_obj_t* – Unused
Returns
The registered type struct object

◆ x_type_comment_struct()

x_obj_t * x_type_comment_struct ( x_obj_t p_base,
x_obj_t p_obj 
)

Build the COMMENT type struct descriptor.

Build the COMMENT type struct descriptor.

Registers the s-expression comment analyse and delimit callbacks.

Parameters
p_basex_obj_t* – Base (execution context)
p_objx_obj_t* – Unused
Returns
Type struct pair list