public static ImmutableList <ParserChar> ToParserChar(this IEnumerable <char> input) { int line = 1; int col = 1; var list = new List <ParserChar>(); foreach (var c in input) { if (c == '\r') { continue; } list.Add(new ParserChar(c, SrcLoc.Return(line, col))); if (c == '\n') { line++; col = 1; } col++; } return(new ImmutableList <ParserChar>(list)); }
public Extern(IdentifierToken id, Term args, SrcLoc location = null) : base(location) { Id = id; Args = args as Arguments; }
public void Log(SrcLoc location, int level = 1, string formatString = "", params object[] parameters) { string message = String.Format(formatString, parameters); }
public Call(IdentifierToken name, Exprs args, SrcLoc location = null) : base(location) { Name = name; Args = args; }
public ParserChar(char c, SrcLoc location = null) { Value = c; Location = location == null ? SrcLoc.Null : location; }
public BinaryOp(Token lhs, Token rhs, Token op, SrcLoc loc = null) : base(loc) { Lhs = lhs; Rhs = rhs; Op = op; }
public Function(IdentifierToken id, Term args, Token body, SrcLoc location = null) : base(location) { Id = id; Args = args as Arguments; Body = body; }
public ReservedOpToken(ImmutableList <ParserChar> value, SrcLoc location = null) : base(value, location) { }
public BracketsToken(IEnumerable <Token> tokens, SrcLoc location = null) : base(tokens, location) { }
public CharToken(ParserChar value, SrcLoc location = null) : base(location) { Value = value; }
public ReservedOpToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(value, location) { }
public BracketingToken(IEnumerable<Token> tokens, SrcLoc location = null) : base(location) { Tokens = tokens; }
public IdentifierToken(ImmutableList <ParserChar> value, SrcLoc location = null) : base(value, location) { }
public NaturalOrFloatToken(double value, SrcLoc location = null) : base(location) { Value = new FloatToken(value, location); }
public NaturalOrFloatToken(int value, SrcLoc location = null) : base(location) { Value = new IntegerToken(value, location); }
public FloatToken(double value, SrcLoc location = null) : base(location) { Value = value; }
public IntegerToken(int value, SrcLoc location = null) : base(location) { Value = value; }
public Token(SrcLoc location) { Location = location; }
public SymbolToken(ImmutableList <ParserChar> value, SrcLoc location = null) : base(value, location == null ? location = value.First().Location : location) { }
public BracketingToken(IEnumerable <Token> tokens, SrcLoc location = null) : base(location) { Tokens = tokens; }
public Arguments(IEnumerable <Token> args, SrcLoc location = null) : base(location) { Args = args; }
public BracketsToken(IEnumerable<Token> tokens, SrcLoc location = null) : base(tokens, location) { }
public OperatorToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(value, location) { }
public SymbolToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(value, location == null ? location = value.First().Location : location) { }
public NaturalOrFloatToken(double value, SrcLoc location = null) : base(location) { Value = new FloatToken(value,location); }
public AnglesToken(IEnumerable<Token> tokens, SrcLoc location = null) : base(tokens,location) { }
public AnglesToken(IEnumerable <Token> tokens, SrcLoc location = null) : base(tokens, location) { }
public ReplParseObject(SrcLoc location) : base(location) { }
public REPLDirectiveParsedObject(String option, ImmutableList <string> parameters, SrcLoc location) : base(location) { this.value = option; this.parameters = parameters; }
public Integer(IntegerToken t, SrcLoc location = null) : base(location) { Value = t; }
public QueryContainer(Query query, SrcLoc location = null) : base(location) { Query = query; }
public OperatorToken(ImmutableList <ParserChar> value, SrcLoc location = null) : base(value, location) { }
public Term(SrcLoc location) : base(location) { }
public CharLiteralToken(ParserChar value, SrcLoc location = null) : base(value,location) { }
public Var(IdentifierToken id, SrcLoc location = null) : base(location) { Id = id; }
public StringToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(location) { Value = value; }
public WhiteSpaceToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(value,location) { }
public StringLiteralToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(value, location) { }
public Expression(Token expr, SrcLoc location = null) : base(location) { Expr = expr; }
public IdentifierToken(ImmutableList<ParserChar> value, SrcLoc location = null) : base(value,location) { }
public Exprs(IEnumerable <Token> exprs, SrcLoc location = null) : base(location) { List = exprs; }
public StringLiteralToken(ImmutableList <ParserChar> value, SrcLoc location = null) : base(value, location) { }