class ExprParser
Defined at line 20 of file ../../src/developer/debug/zxdb/expr/expr_parser.h
Public Methods
const Err & err ()
The result of parsing. Since this does not have access to the initial string, it will not
indicate context for the error. That can be generated from the error_token() if desired.
Defined at line 62 of file ../../src/developer/debug/zxdb/expr/expr_parser.h
ExprToken error_token ()
Defined at line 64 of file ../../src/developer/debug/zxdb/expr/expr_parser.h
void ExprParser (std::vector<ExprToken> tokens, ExprLanguage lang, fxl::RefPtr<EvalContext> eval_context)
The eval context can be null if the caller doesn't have any symbol context. This means that we
can't resolve any type or variable names, and can't disambiguate some cases like how to parse
"Foo < 1 > bar". In this mode, we'll assume that "<" after a name always mean a template rather
than a comparison operation.
Defined at line 232 of file ../../src/developer/debug/zxdb/expr/expr_parser.cc
fxl::RefPtr<ExprNode> ParseStandaloneExpression ()
Parses an expression by itself, for example, the content of the debugger frontend "print"
command. This should never be called internally by the parser to parse subexpressions, use
ParseExpression() for that.
Returns the root expression node on successful parsing. On error, returns an empty pointer in
which case the error message can be read from err() and error_token()
Defined at line 246 of file ../../src/developer/debug/zxdb/expr/expr_parser.cc
fxl::RefPtr<BlockExprNode> ParseBlock (BlockDelimiter delimiter)
Parses a block. { and } will be consumed (these are optional if the block delimiter is set to
implicit). The input is counted as being complete.
Defined at line 258 of file ../../src/developer/debug/zxdb/expr/expr_parser.cc
Err ParseIdentifier (const std::string & input, Identifier * output)
Attempts to parse the given string as an identifier. The returned err indicates whether the
output identifier is valid.
Defined at line 278 of file ../../src/developer/debug/zxdb/expr/expr_parser.cc
Err ParseIdentifier (const std::string & input, ParsedIdentifier * output)
static
Defined at line 288 of file ../../src/developer/debug/zxdb/expr/expr_parser.cc
Enumerations
enum BlockDelimiter
| Name | Value |
|---|---|
| kExplicit | 0 |
| kImplicit | 1 |
Defined at line 22 of file ../../src/developer/debug/zxdb/expr/expr_parser.h
enum BlockEnd
| Name | Value |
|---|---|
| kExplicit | 0 |
| kEndOfInput | 1 |
Defined at line 26 of file ../../src/developer/debug/zxdb/expr/expr_parser.h