MCPcopy Create free account
hub / github.com/anjo76/angelscript / ParseExprPreOp

Method ParseExprPreOp

sdk/angelscript/source/as_parser.cpp:2271–2289  ·  view source on GitHub ↗

BNF:11: EXPRPREOP ::= '-' | '+' | '!' | '++' | '--' | '~' | '@'

Source from the content-addressed store, hash-verified

2269
2270// BNF:11: EXPRPREOP ::= '-' | '+' | '!' | '++' | '--' | '~' | '@'
2271asCScriptNode *asCParser::ParseExprPreOp()
2272{
2273 asCScriptNode *node = CreateNode(snExprPreOp);
2274 if( node == 0 ) return 0;
2275
2276 sToken t;
2277 GetToken(&t);
2278 if( !IsPreOperator(t.type) )
2279 {
2280 Error(TXT_EXPECTED_PRE_OPERATOR, &t);
2281 Error(InsteadFound(t), &t);
2282 return node;
2283 }
2284
2285 node->SetToken(&t);
2286 node->UpdateSourcePos(t.pos, t.length);
2287
2288 return node;
2289}
2290
2291// BNF:11: EXPRPOSTOP ::= ('.' (FUNCCALL | IDENTIFIER)) | ('[' (IDENTIFIER ':')? ASSIGN (',' (IDENTIFIER ':')? ASSIGN)* ']') | ARGLIST | '++' | '--'
2292asCScriptNode *asCParser::ParseExprPostOp()

Callers

nothing calls this directly

Calls 2

SetTokenMethod · 0.80
UpdateSourcePosMethod · 0.80

Tested by

no test coverage detected