public void AddObject(string Name, TypeObject Type) { double CreateObjectCoordinateX = ((this.ActualWidth / 2) - CoordinateMap.X) / WidthMap; double CreateObjectCoordinateY = ((this.ActualHeight / 2) - CoordinateMap.Y) / HeightMap; SourceElements.Add(new MapObject(CreateObjectCoordinateX, CreateObjectCoordinateY, Type)); SourceElements[SourceElements.Count - 1].Name = Name; ItemSelection = SourceElements.Count - 1; (Application.Current.MainWindow as MainWindow).EnableBlur = false; }
public override object Walk(SourceElements node) { object result = null; foreach (var statement in node.Statements) { result = statement.Accept(this); } return(result); }
public BikeFunction(Node node, Identifier funcName, List <FormalParameter> parameters, SourceElements body, ScopeFrame boundScope) : base(InterpretationContext.FunctionBase) { Node = node; Name = new BikeString(funcName == null ? Anonymous : funcName.Value); Parameters = parameters; Body = body; BoundScope = boundScope; DefineVariables(); }
public virtual object Walk(SourceElements node) { if (Enter(node)) { foreach (var statement in node.Statements) { statement.Accept(this); } } Exit(node); return(null); }
public BikeFunction(Node node, Identifier funcName, List<FormalParameter> parameters, SourceElements body, ScopeFrame boundScope) : base(InterpretationContext.FunctionBase) { Node = node; Name = new BikeString(funcName == null ? Anonymous : funcName.Value); Parameters = parameters; Body = body; BoundScope = boundScope; DefineVariables(); }
public virtual object Walk(SourceElements node) { if (Enter(node)) { foreach (var statement in node.Statements) { statement.Accept(this); } } Exit(node); return null; }
public SourceElements ParseSourceElements() { var sourceElements = new SourceElements { Token = Next() }; while (Next().IsNot(TokenType.Eof) && Next().IsNot(TokenType.RightBrace)) { var statement = Next().Is(TokenType.Func) ? ParseFunctionDeclaration() : ParseStatement(); sourceElements.Statements.Add(statement); } return(sourceElements); }
public override void Exit(SourceElements node) { level--; }
public override bool Enter(SourceElements node) { Print("SourceElements"); level++; return true; }
public InputSource(List <Element> elements, params Keys[] keys) { SourceElements.AddRange(elements); SourceKeys.AddRange(keys); }
public InputSource(params Element[] elements) { SourceElements.AddRange(elements); }
public InputSource(Element element, Keys key) { SourceElements.Add(element); SourceKeys.Add(key); }
public InputSource(Element element) { SourceElements.Add(element); }
public virtual bool Enter(SourceElements node) { return true; }
public virtual void Exit(SourceElements node) { }
public virtual bool Enter(SourceElements node) { return(true); }
public SourceElements ParseSourceElements() { var sourceElements = new SourceElements { Token = Next() }; while (Next().IsNot(TokenType.Eof) && Next().IsNot(TokenType.RightBrace)) { var statement = Next().Is(TokenType.Func) ? ParseFunctionDeclaration() : ParseStatement(); sourceElements.Statements.Add(statement); } return sourceElements; }
public override bool Enter(SourceElements node) { Print("SourceElements"); level++; return(true); }
public override object Walk(SourceElements node) { object result = null; foreach (var statement in node.Statements) { result = statement.Accept(this); } return result; }