Beispiel #1
0
        //
        internal void ParseNamespace(Token tok)
        {
            Advance(); //past 'namespace
            NamespaceBlock def = new NamespaceBlock(CurrentToken);

            Advance(); //past name
            ParseLines(def);
            CurrentNode.AddChild(def);
        }
Beispiel #2
0
        void ParseCondition()
        {
            LhsCondStmt def = new LhsCondStmt();

            PushNode(def);
            ExprSeq expr = ParseExprSeq();

            PopNode();

            def.ExprSeq = expr;
            CurrentNode.AddChild(def);
        }
Beispiel #3
0
        internal void ParseBrain(Token tok)
        {
            Advance(); //past 'brain
            Token token = CurrentToken;

            Advance(); //past name
            BrainDef def = new BrainDef(token, TokenInstance.CSharp.BRAIN);

            RootBlock.BrainDef = def;
            ParseLines(def);
            CurrentNode.AddChild(def);
        }
Beispiel #4
0
        internal void ParseExpert(Token tok)
        {
            Advance();//past expert
            Token name = CurrentToken;

            Advance();//past name
            //
            Token baseName = TokenInstance.CSharp.EXPERT;

            if (CurrentToken.Kind == TokenKind.RoundList)
            {
                TokenList tokList = CurrentList;
                if (tokList.Count != 0)
                {
                    baseName = tokList[0];
                }
                Advance();//past base name
            }
            //
            ExpertDef def = new ExpertDef(name, baseName);

            CurrentNode.AddChild(def);
            ParseLines(def);
        }