public override bool NotEquals(Primitive first, Primitive second) { var f = (decimal)first.Value; var s = (decimal)second.Value; return f != s; }
public override void Clear() { this.Header = ""; this.Parent = null; this.Cases = new Dictionary<Primitive, List<IAst>>(); this.Default = null; }
public override bool LessThan(Primitive first, Primitive second) { var f = (decimal)first.Value; var s = (decimal)second.Value; return f < s; }
public override Boolean ParserHeader(string aHeader) { Boolean returns = false; var rg = new Regex(Parser.Grammar.GetPattern("whilestart").ToString()); Match values = rg.Match(this.Header); if (values.Groups["val"].Value.ToLower() == "true") { this.Left = new EcString("1", false); this.Right = new EcString("1", false); this.op = "=="; } else if (values.Groups["val"].Value.ToLower() == "false") { this.Left = new EcString("1"); this.Right = new EcString("1"); this.op = "!="; } else { this.Left = new EcString(values.Groups["left"].Value); this.Right = new EcString(values.Groups["right"].Value); this.op = values.Groups["operator"].Value; } return returns; }
public override void Clear() { this.Nodes = new List<IAst>(); this.Header = ""; this.Left = null; this.Right = null; this.op = ""; }
public override bool LessThan(Primitive first, Primitive second) { var f = (decimal)first.Value; var s = (decimal)second.Value; if (f < s) { return true; } return false; }
public override void Clear() { this.Statements = new List<IAst>(); this.Header = ""; this.Left = null; this.Right = null; this.op = ""; this.Value = null; this.setValue = null; this.forop = null; this.Step = null; }
public static void Store(string name, Primitive o, List<AttributeStmt> Attributes = null) { try { internals.Add(name, o); if (Attributes != null) { DeclarationAttributes.Add(name, Attributes); } } catch { } }
public virtual bool Mod(Primitive first, Primitive second) { return false; }
public virtual Primitive MinusEquals(Primitive first, Primitive second) { return null; }
public virtual bool LessThan(Primitive first, Primitive second) { return false; }
public virtual bool GreaterThan(Primitive first, Primitive second) { return false; }
public virtual bool NotEquals(Primitive first, Primitive second) { return false; }
public override Boolean ParserHeader(string aHeader) { var rg = new Regex(Parser.Grammar.GetPattern("forstart").ToString()); Match values = rg.Match(this.Header); this.Left = new EcString(values.Groups["left"].Value); this.Right = new EcString(values.Groups["right"].Value); this.op = values.Groups["operator"].Value; this.Value = values.Groups["Name"].Value; this.setValue = values.Groups["Type"].Value; this.forop = values.Groups["Forop"].Value; try { this.Step = new Step { Every = int.Parse(values.Groups["step"].Value) }; } catch { } return true; }
public ThrowException(Primitive p) { this.p = p; }
public override Primitive MinusEquals(Primitive first, Primitive second) { return new EcNumber(((decimal)first.Value) - ((decimal)second.Value)); }
public override bool NotEquals(Primitive first, Primitive second) { var f = (decimal)first.Value; var s = (decimal)second.Value; if (f != s) { return true; } return false; }
public override bool ParserHeader(string aHeader) { Match values = Parser.Grammar.GetPattern("switchstart").Match(this.Header); Group par = values.Groups["Name"]; if (SymbolTable.Contains(par.Value)) { this.Parent = SymbolTable.Get(par.Value); } else { this.Parent = new EcObject(par.Value); } return true; }
public static void Set(string name, Primitive newValue) { internals[name] = newValue; }