Пример #1
0
 public void Visit(EntitiesTypeNodeNode entitiesTypeNodeNode)
 {
 }
Пример #2
0
 public void Visit(EntitiesTypeNodeNode entitiesTypeNodeNode)
 {
     sb.AppendLine("Entities");
 }
Пример #3
0
        public GameObjectContentNode VisitGameObjectContent(DazelParser.GameObjectContentContext context)
        {
            GameObjectContentTypeNode gameObjectContentTypeNode;

            switch (context.gameObjectContentType.Type)
            {
            case DazelLexer.MAP:
                gameObjectContentTypeNode = new MapTypeNode()
                {
                    Token = context.Start
                };
                break;

            case DazelLexer.ONSCREENENTERED:
                gameObjectContentTypeNode = new OnScreenEnteredTypeNode()
                {
                    Token = context.Start
                };
                break;

            case DazelLexer.ENTITIES:
                gameObjectContentTypeNode = new EntitiesTypeNodeNode()
                {
                    Token = context.Start
                };
                break;

            case DazelLexer.EXITS:
                gameObjectContentTypeNode = new ExitsTypeNodeNode()
                {
                    Token = context.Start
                };
                break;

            case DazelLexer.DATA:
                gameObjectContentTypeNode = new DataTypeNodeNode()
                {
                    Token = context.Start
                };
                break;

            case DazelLexer.PATTERN:
                gameObjectContentTypeNode = new PatternTypeNode()
                {
                    Token = context.Start
                };
                break;

            default:
                throw new ArgumentException("Invalid content type.");
            }

            GameObjectContentNode contentNode = new GameObjectContentNode()
            {
                Token      = context.Start,
                Statements = VisitStatementBlock(context.statementBlock()),
                TypeNode   = gameObjectContentTypeNode,
            };

            return(contentNode);
        }