public override LuaSyntaxNode VisitLockStatement(LockStatementSyntax node)
        {
            LuaStatementListSyntax statements = new LuaStatementListSyntax();

            statements.Statements.Add(new LuaShortCommentStatement($" {node.LockKeyword}({node.Expression})"));
            LuaBlockStatementSyntax block = new LuaBlockStatementSyntax();

            WriteStatementOrBlock(node.Statement, block);
            statements.Statements.Add(block);
            return(statements);
        }
        public override LuaSyntaxNode VisitFixedStatement(FixedStatementSyntax node)
        {
            LuaStatementListSyntax statements = new LuaStatementListSyntax();

            statements.Statements.Add(new LuaShortCommentStatement(" " + node.FixedKeyword));
            LuaBlockStatementSyntax block = new LuaBlockStatementSyntax();
            var declaration = (LuaStatementSyntax)node.Declaration.Accept(this);

            block.Statements.Add(declaration);
            WriteStatementOrBlock(node.Statement, block);
            statements.Statements.Add(block);
            return(statements);
        }
示例#3
0
 internal void Render(LuaBlockStatementSyntax node)
 {
     Render((LuaBlockSyntax)node);
     WriteNewLine();
 }