public DMVariable(DreamPath?type, string name, bool isGlobal) { Type = type; Name = name; IsGlobal = isGlobal; Value = null; }
public ListIndex(Location location, DMExpression expr, DMExpression index, DreamPath?path, bool conditional) : base(location, path) { _expr = expr; _index = index; _conditional = conditional; }
public Dereference(Location location, DreamPath?path, DMExpression expr, bool conditional, string propertyName) : base(location, null) { _expr = expr; _conditional = conditional; PropertyName = propertyName; _path = path; }
public void VisitUpwardPathSearch(DMASTUpwardPathSearch constant) { DMExpression.TryConstant(_dmObject, _proc, constant.Path, out var pathExpr); if (pathExpr is not Expressions.Path) { throw new CompileErrorException(constant.Location, "Cannot do an upward path search on " + pathExpr); } DreamPath path = ((Expressions.Path)pathExpr).Value; DreamPath?foundPath = DMObjectTree.UpwardSearch(path, constant.Search.Path); if (foundPath == null) { throw new CompileErrorException(constant.Location, $"Invalid path {path}.{constant.Search.Path}"); } Result = new Expressions.Path(constant.Location, foundPath.Value); }
public LocalConstVariable(int id, DreamPath?type, Expressions.Constant value) : base(id, false, type) { Value = value; }
public LocalVariable(int id, bool isParameter, DreamPath?type) { Id = id; IsParameter = isParameter; Type = type; }
public LValue(Location location, DreamPath?path) : base(location) { _path = path; }
public Src(Location location, DreamPath?path) : base(location, path) { }
public GlobalField(Location location, DreamPath?path, int id) : base(location, path) { Id = id; }
internal DMVisitorExpression(DMObject dmObject, DMProc proc, DreamPath?inferredPath) { _dmObject = dmObject; _proc = proc; _inferredPath = inferredPath; }
public DreamValueAsObjectEnumerator(IEnumerable <DreamValue> dreamValues, DreamPath?filterType = null) { _dreamValueEnumerator = dreamValues.GetEnumerator(); _filterType = filterType; }
public DreamObjectEnumerator(IEnumerable <DreamObject> dreamObjects, DreamPath?filterType = null) { _dreamObjectEnumerator = dreamObjects.GetEnumerator(); _filterType = filterType; }
public DMLocalVariable(int id, DreamPath?type) { Id = id; Type = type; }
public static void Emit(DMObject dmObject, DMProc proc, DMASTExpression expression, DreamPath?inferredPath = null) { var expr = Create(dmObject, proc, expression, inferredPath); expr.EmitPushValue(dmObject, proc); }
public static DMExpression Create(DMObject dmObject, DMProc proc, DMASTExpression expression, DreamPath?inferredPath = null) { var instance = new DMVisitorExpression(dmObject, proc, inferredPath); expression.Visit(instance); return(instance.Result); }