コード例 #1
0
        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);
        }
コード例 #2
0
 public ITerminalWrapper GetValueOrNull(ElementBase key)
 {
     try
     {
         return GetValue(key);
     }
     catch (QLError)
     {
         return null;
     }
 }
コード例 #3
0
 public void Visit(ElementBase elementBase)
 {
     Exceptions.Add(new QLError(string.Format("Type checker was called for {0} but is not implemented", elementBase.GetType().Name)));
 }
コード例 #4
0
 /// <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");
 }
コード例 #5
0
 public void Visit(ElementBase node)
 {
     throw new QLError("Not implemented type to evaluate: " + node.GetType());
 }
コード例 #6
0
 public void Visit(ElementBase elementBase)
 {
     throw new QLError("Exporter attemted to export an ElementBase which is not allowed", elementBase.SourceLocation);
 }
コード例 #7
0
ファイル: QLWarning.cs プロジェクト: javachengwc/many-ql
 public QLWarning(string message, ElementBase source)
     : base(message, source)
 {
 }
コード例 #8
0
 public QLBaseException(string message, ElementBase source)
     : base(message)
 {
     SourceLocation = source.SourceLocation;
 }
コード例 #9
0
ファイル: QLError.cs プロジェクト: javachengwc/many-ql
 public QLError(string message, ElementBase source)
     : base(message, source)
 {
 }
コード例 #10
0
 public TypeCheckerError(string message, ElementBase source)
     : base(message)
 {
     SourceLocation = source.SourceLocation;
 }
コード例 #11
0
ファイル: QLListener.cs プロジェクト: javachengwc/many-ql
 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;
     }
 }