MCPcopy Create free account
hub / github.com/WheretIB/nullc / ParseGroup

Function ParseGroup

NULLC/Parser.cpp:1725–1745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1723}
1724
1725bool ParseGroup(Lexeme** str)
1726{
1727 if(!ParseLexem(str, lex_oparen))
1728 return false;
1729
1730 if(!ParseVaribleSet(str))
1731 ThrowError((*str)->pos, "ERROR: expression not found after '('");
1732 if(!ParseLexem(str, lex_cparen))
1733 ThrowError((*str)->pos, "ERROR: closing ')' not found after '('");
1734
1735 if(ParseLexem(str, lex_dec))
1736 {
1737 UndoDereferceNode((*str)->pos);
1738 AddUnaryModifyOpNode((*str)->pos, OP_DECREMENT, OP_POSTFIX);
1739 }else if(ParseLexem(str, lex_inc)){
1740 UndoDereferceNode((*str)->pos);
1741 AddUnaryModifyOpNode((*str)->pos, OP_INCREMENT, OP_POSTFIX);
1742 }
1743
1744 return true;
1745}
1746
1747bool ParseString(Lexeme** str)
1748{

Callers 1

ParseTerminalFunction · 0.85

Calls 5

ParseLexemFunction · 0.85
ParseVaribleSetFunction · 0.85
ThrowErrorFunction · 0.85
UndoDereferceNodeFunction · 0.85
AddUnaryModifyOpNodeFunction · 0.85

Tested by

no test coverage detected