public override void Visit(DequeueQueryNode node)
 {
     Debug.Print("DequeueQueryNode");
     ProgramCode.Append("DEQUEUE FROM ");
     ProgramCode.Append($"{node.Variable}");
     ProgramCode.Append(");\n");
 }
Esempio n. 2
0
        public override AbstractNode VisitDequeueOPOneLine([NotNull] GiraphParser.DequeueOPOneLineContext context)
        {
            DequeueQueryNode DequeueNode = new DequeueQueryNode(context.Start.Line, context.Start.Column);

            DequeueNode.Variable = context.variable().GetText();
            DequeueNode.Name     = DequeueNode.Variable;
            return(DequeueNode);
        }
 public override void Visit(DequeueQueryNode node)
 {
     // TODO: Check if a its a variable that is being added or a constant
     SymbolTable.SetCurrentNode(node);
     if (node.Variable != null)
     {
         CheckDeclared(node.Variable);
     }
 }
Esempio n. 4
0
        public override void Visit(DequeueQueryNode node)
        {
            _symbolTable.SetCurrentNode(node);
            AllType CollectionType = _symbolTable.RetrieveSymbol(node.Variable, out bool isCollection) ?? AllType.UNKNOWNTYPE;

            if (!isCollection)
            {
                _symbolTable.ExpectedCollection();
                return;
            }
            node.Type = CollectionType.ToString().ToLower();
        }
Esempio n. 5
0
 public abstract void Visit(DequeueQueryNode node);