public ITerminalWrapper GetValue(ElementBase key) { if (key is IResolvable) return GetValue(key as IResolvable); // fallback in case we've requested the value of a variable directly return GetValue((Identifier)key); }
public ITerminalWrapper GetValueOrNull(ElementBase key) { try { return GetValue(key); } catch (QLError) { return null; } }
public void Visit(ElementBase elementBase) { Exceptions.Add(new QLError(string.Format("Type checker was called for {0} but is not implemented", elementBase.GetType().Name))); }
/// <summary> /// This method has a signature with the highest class in the hierarchy and will act as a fallback /// </summary> public void Visit(ElementBase elementBase) { Debug.Assert(false, "GUI Visitor did not expect an ElementBase fallback"); }
public void Visit(ElementBase node) { throw new QLError("Not implemented type to evaluate: " + node.GetType()); }
public void Visit(ElementBase elementBase) { throw new QLError("Exporter attemted to export an ElementBase which is not allowed", elementBase.SourceLocation); }
public QLWarning(string message, ElementBase source) : base(message, source) { }
public QLBaseException(string message, ElementBase source) : base(message) { SourceLocation = source.SourceLocation; }
public QLError(string message, ElementBase source) : base(message, source) { }
public TypeCheckerError(string message, ElementBase source) : base(message) { SourceLocation = source.SourceLocation; }
private void AppendToAST(ElementBase newChild) { if (_childrenStack.Any()) { Queue<ElementBase> siblings = _childrenStack.Peek(); siblings.Enqueue(newChild); } else { //this is the last one, it should be Form _astRootNode = (Form)newChild; } }