public Token(string str,CodeData data,ref int column,bool flag)
 {
     this.data = data;
     int fir = column - (flag ? 1 : 0);
     for(;column<str.Length;++column)
     {
         if (flag ? str[column] == '"' : (str[column] == ')' || str[column] == ' ' || str[column] == '#'))
         {
             this.token = str.Substring(fir, column - fir + (flag ? 1 : 0));
             return;
         }
     }
     this.token = str.Substring(fir, column - fir + (flag ? 1 : 0));
 }
Example #2
0
 public MultiSentence(IEnumerable<Sentence> sentences, CodeData data)
 {
     this.sentences = sentences;
     this.data = data;
 }
Example #3
0
 public Foreach(string name,Sentence sentence,Expression expr,CodeData data)
 {
     this.name = name;
     this.sentence = sentence;
     this.expr = expr;
     this.data = data;
 }
Example #4
0
 public YieldReturn(Expression expr,CodeData data)
 {
     this.data = data;
     this.expr = expr;
 }
Example #5
0
 public Expr(Expression expr,CodeData data)
 {
     this.data = data;
     this.expr = expr;
 }
Example #6
0
 public Global(string name,Expression expr,CodeData data)
 {
     this.data = data;
     this.name = name;
     this.expr = expr;
 }
Example #7
0
 public If(IEnumerable<Tuple<Expression, Sentence>> sentences, CodeData data)
 {
     this.data = data;
     this.sentences = sentences;
     this.else_sentence = null;
 }
Example #8
0
 public While(Expression cond,Sentence source,CodeData data)
 {
     this.data = data;
     this.cond = cond;
     this.source = source;
 }
Example #9
0
 public For(Sentence source,string name,Expression first,Expression last,Expression step,CodeData data)
 {
     this.data = data;
     this.source = source;
     this.name = name;
     this.first = first;
     this.last = last;
     this.step = step;
 }
 public Function(IFunction func,IEnumerable<Expression> exprs,CodeData data)
 {
     this.func = func;
     this.exprs = exprs;
     this.data = data;
 }
 public Value(string name, CodeData data)
 {
     this.name = name;
     this.data = data;
 }
 public Literal(dynamic value,CodeData data)
 {
     this.data = data;
     this.value = value;
 }
 public Token(string token,CodeData data)
 {
     this.token = token;
     this.data = data;
 }
 public Tree(List<TokenTree> tree,CodeData data)
 {
     this.tree = tree;
     this.data = data;
 }
 public Tree(string str, int line, string filename)
 {
     int column = 0;
     this.tree = InitialParse(str, line, ref column, filename);
     this.data = new CodeData(line, 0, filename);
 }