Beispiel #1
0
 private void GenVarDev(AegisVarDecl aegisVarDecl)
 {
     if (!Variable.haxforever.Contains(aegisVarDecl.Name.ToLower()))
     {
         Variable.haxforever.Add(aegisVarDecl.Name.ToLower());
     }
     WriteNewLine("set .@{0}, {1};", aegisVarDecl.Name, TranslateExpr(aegisVarDecl.Exp));
 }
Beispiel #2
0
        private AegisVarDecl MatchVarDecl()
        {
            Match(TokenType.VarDecl);

            var vd = new AegisVarDecl();

            vd.Name = MatchIdent();

            if (tk.Type == TokenType.SET)
            {
                Match(TokenType.SET);

                vd.Exp = MatchExpr();
                if (fallback)
                {
                    return(null);
                }
                return(vd);
            }
            else
            {
                return(null);
            }
        }