/******************************************************************************* * Copyright (c) 2011 Bruno Medeiros and other Contributors. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Bruno Medeiros - initial API and implementation *******************************************************************************/ package dtool.ast.statements; import melnorme.lang.tooling.ast.CommonASTNode; import melnorme.lang.tooling.ast.IASTVisitor; import melnorme.lang.tooling.ast.util.ASTCodePrinter; import melnorme.lang.tooling.ast_actual.ASTNodeTypes; import melnorme.utilbox.collections.ArrayView; import dtool.parser.common.IToken; public class StatementAsm extends Statement { public final ArrayView<IToken> tokens; public StatementAsm(ArrayView<IToken> tokens) { this.tokens = tokens; } @Override public ASTNodeTypes getNodeType() { return ASTNodeTypes.STATEMENT_ASM; } @Override public void visitChildren(IASTVisitor visitor) { } @Override protected CommonASTNode doCloneTree() { return new StatementAsm(tokens); } @Override public void toStringAsCode(ASTCodePrinter cp) { cp.append("asm "); if(tokens != null) { cp.append("{"); cp.appendTokenList(tokens, " ", true); cp.append("}"); } } }