private StringValueNode ParseStringLiteral(ParserContext context) { SyntaxToken start = context.ExpectString(); bool isBlock = start.Kind == TokenKind.BlockString; Location location = context.CreateLocation(start); return(new StringValueNode(location, start.Value, isBlock)); }
private static NameNode ParseJsonName(ParserContext context) { SyntaxToken token = context.Current.Kind == TokenKind.String ? context.ExpectString() : context.ExpectName(); Location location = context.CreateLocation(token); return(new NameNode ( location, token.Value )); }