Data Fields
expr_ast_node Struct Reference

Structure representing one AST node. More...

#include <expressions.h>

Data Fields

ExprASTNodeType type
 
ExprASTNodechildren
 Node children: e.g. for 1 + 2 nodes 1 and 2 will be children of +. More...
 
ExprASTNodenext
 
ParserPosition start
 
size_t len
 
union {
   struct {
      int   name
 Register name, may be -1 if name not present. More...
 
   }   reg
 For kExprNodeRegister. More...
 
   struct {
      struct {
         bool   allow_dict
 True if UnknownFigure may actually represent dictionary literal. More...
 
         bool   allow_lambda
 True if UnknownFigure may actually represent lambda. More...
 
         bool   allow_ident
 True if UnknownFigure may actually be part of curly braces name. More...
 
      }   type_guesses
 Which nodes UnknownFigure can’t possibly represent. More...
 
      size_t   opening_hl_idx
 Highlight chunk index, used for rehighlighting if needed. More...
 
   }   fig
 For kExprNodeUnknownFigure. More...
 
   struct {
      ExprVarScope   scope
 
      const char *   ident
 
      size_t   ident_len
 Actual identifier length. More...
 
   }   var
 For kExprNodePlainIdentifier and kExprNodePlainKey. More...
 
   struct {
      bool   got_colon
 True if colon was seen. More...
 
   }   ter
 For kExprNodeTernaryValue. More...
 
   struct {
      ExprComparisonType   type
 Comparison type. More...
 
      ExprCaseCompareStrategy   ccs
 Case comparison strategy. More...
 
      bool   inv
 True if comparison is to be inverted. More...
 
   }   cmp
 For kExprNodeComparison. More...
 
   struct {
      uvarnumber_T   value
 
   }   num
 For kExprNodeInteger. More...
 
   struct {
      float_T   value
 
   }   flt
 For kExprNodeFloat. More...
 
   struct {
      char *   value
 
      size_t   size
 
   }   str
 
   struct {
      const char *   ident
 Option name start. More...
 
      size_t   ident_len
 Option name length. More...
 
      ExprOptScope   scope
 Option scope: &l:, &g: or not specified. More...
 
   }   opt
 For kExprNodeOption. More...
 
   struct {
      const char *   ident
 Environment variable name start. More...
 
      size_t   ident_len
 Environment variable name length. More...
 
   }   env
 For kExprNodeEnvironment. More...
 
   struct {
      ExprAssignmentType   type
 
   }   ass
 For kExprNodeAssignment. More...
 
data
 

Detailed Description

Structure representing one AST node.

Field Documentation

bool expr_ast_node::allow_dict

True if UnknownFigure may actually represent dictionary literal.

bool expr_ast_node::allow_ident

True if UnknownFigure may actually be part of curly braces name.

bool expr_ast_node::allow_lambda

True if UnknownFigure may actually represent lambda.

struct { ... } expr_ast_node::ass

For kExprNodeAssignment.

ExprCaseCompareStrategy expr_ast_node::ccs

Case comparison strategy.

ExprASTNode* expr_ast_node::children

Node children: e.g. for 1 + 2 nodes 1 and 2 will be children of +.

struct { ... } expr_ast_node::cmp

For kExprNodeComparison.

union { ... } expr_ast_node::data
struct { ... } expr_ast_node::env

For kExprNodeEnvironment.

struct { ... } expr_ast_node::fig

For kExprNodeUnknownFigure.

struct { ... } expr_ast_node::flt

For kExprNodeFloat.

bool expr_ast_node::got_colon

True if colon was seen.

const char* expr_ast_node::ident

Option name start.

Environment variable name start.

Actual identifier without scope.

Points to inside parser reader state.

size_t expr_ast_node::ident_len

Actual identifier length.

Environment variable name length.

Option name length.

bool expr_ast_node::inv

True if comparison is to be inverted.

size_t expr_ast_node::len
int expr_ast_node::name

Register name, may be -1 if name not present.

ExprASTNode* expr_ast_node::next

Next node: e.g. for 1 + 2 child nodes 1 and 2 are put into a single-linked list: (+)->children references only node 1, node 2 is in (+)->children->next.

struct { ... } expr_ast_node::num

For kExprNodeInteger.

size_t expr_ast_node::opening_hl_idx

Highlight chunk index, used for rehighlighting if needed.

struct { ... } expr_ast_node::opt

For kExprNodeOption.

struct { ... } expr_ast_node::reg

For kExprNodeRegister.

ExprVarScope expr_ast_node::scope

Scope character or 0 if not present.

ExprOptScope expr_ast_node::scope

Option scope: &l:, &g: or not specified.

size_t expr_ast_node::size
ParserPosition expr_ast_node::start
struct { ... } expr_ast_node::str

For kExprNodeSingleQuotedString and kExprNodeDoubleQuotedString.

struct { ... } expr_ast_node::ter

For kExprNodeTernaryValue.

ExprASTNodeType expr_ast_node::type

Node type.

ExprComparisonType expr_ast_node::type

Comparison type.

ExprAssignmentType expr_ast_node::type
struct { ... } expr_ast_node::type_guesses

Which nodes UnknownFigure can’t possibly represent.

uvarnumber_T expr_ast_node::value
float_T expr_ast_node::value
char* expr_ast_node::value
struct { ... } expr_ast_node::var

For kExprNodePlainIdentifier and kExprNodePlainKey.


The documentation for this struct was generated from the following file: