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

Function ParseString

NULLC/Parser.cpp:1747–1761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1745}
1746
1747bool ParseString(Lexeme** str)
1748{
1749 bool unescaped = false;
1750 if(ParseLexem(str, lex_at))
1751 unescaped = true;
1752 if((*str)->type != lex_quotedstring)
1753 return false;
1754
1755 if((*str)->length == 1 || (*str)->pos[(*str)->length - 1] != '\"')
1756 ThrowError((*str)->pos, "ERROR: unclosed string constant");
1757
1758 AddStringNode((*str)->pos, (*str)->pos+(*str)->length, unescaped);
1759 (*str)++;
1760 return true;
1761}
1762
1763bool ParseArray(Lexeme** str)
1764{

Callers 1

ParseTerminalFunction · 0.85

Calls 3

ParseLexemFunction · 0.85
ThrowErrorFunction · 0.85
AddStringNodeFunction · 0.85

Tested by

no test coverage detected