BNF:12: LITERAL ::= NUMBER | STRING | BITS | 'true' | 'false' | 'null' BNF:17: NUMBER ::= single token: includes integers and real numbers, same as C++ BNF:17: STRING ::= single token: single quoted ', double quoted ", or heredoc multi-line string """ BNF:17: BITS ::= single token: binary 0b or 0B, octal 0o or 0O, decimal 0d or 0D, hexadecimal 0x or 0X
| 1588 | // BNF:17: STRING ::= single token: single quoted ', double quoted ", or heredoc multi-line string """ |
| 1589 | // BNF:17: BITS ::= single token: binary 0b or 0B, octal 0o or 0O, decimal 0d or 0D, hexadecimal 0x or 0X |
| 1590 | asCScriptNode *asCParser::ParseConstant() |
| 1591 | { |
| 1592 | asCScriptNode *node = CreateNode(snConstant); |
| 1593 | if( node == 0 ) return 0; |
| 1594 | |
| 1595 | sToken t; |
| 1596 | GetToken(&t); |
| 1597 | if( !IsConstant(t.type) ) |
| 1598 | { |
| 1599 | Error(TXT_EXPECTED_CONSTANT, &t); |
| 1600 | Error(InsteadFound(t), &t); |
| 1601 | return node; |
| 1602 | } |
| 1603 | |
| 1604 | node->SetToken(&t); |
| 1605 | node->UpdateSourcePos(t.pos, t.length); |
| 1606 | |
| 1607 | // We want to gather a list of string constants to concatenate as children |
| 1608 | if( t.type == ttStringConstant || t.type == ttMultilineStringConstant || t.type == ttHeredocStringConstant ) |
| 1609 | RewindTo(&t); |
| 1610 | |
| 1611 | while( t.type == ttStringConstant || t.type == ttMultilineStringConstant || t.type == ttHeredocStringConstant ) |
| 1612 | { |
| 1613 | node->AddChildLast(ParseStringConstant()); |
| 1614 | |
| 1615 | GetToken(&t); |
| 1616 | RewindTo(&t); |
| 1617 | } |
| 1618 | |
| 1619 | return node; |
| 1620 | } |
| 1621 | |
| 1622 | bool asCParser::IsLambda() |
| 1623 | { |
nothing calls this directly
no test coverage detected