viml/parser/expressions: Add support for string parsing

This commit is contained in:
ZyX
2017-10-08 21:52:38 +03:00
parent c484613ce0
commit af38cea133
8 changed files with 1938 additions and 13 deletions

View File

@@ -195,6 +195,8 @@ typedef enum {
kExprNodeConcatOrSubscript = 'S',
kExprNodeInteger = '0', ///< Integral number.
kExprNodeFloat = '1', ///< Floating-point number.
kExprNodeSingleQuotedString = '\'',
kExprNodeDoubleQuotedString = '"',
} ExprASTNodeType;
typedef struct expr_ast_node ExprASTNode;
@@ -249,6 +251,11 @@ struct expr_ast_node {
struct {
float_T value;
} flt; ///< For kExprNodeFloat.
struct {
char *value;
size_t size;
} str; ///< For kExprNodeSingleQuotedString and
///< kExprNodeDoubleQuotedString.
} data;
};