public GGLiteral ParseInt() { var literal = new GGLiteral(int.Parse(reader.GetTokenText(reader.Token), CultureInfo.InvariantCulture)); reader.Next(); return(literal); }
public GGLiteral ParseString() { var text = reader.GetTokenText(reader.Token); var literal = new GGLiteral(text.Substring(1, text.Length - 2)); reader.Next(); return(literal); }
private GGValue ParseNumber() { var text = reader.GetTokenText(reader.Token); if (int.TryParse(text, NumberStyles.Integer, CultureInfo.InvariantCulture, out int value)) { var literal = new GGLiteral(value); reader.Next(); return(literal); } return(ParseDouble()); }