import org.jastadd.plugin.compiler.ast.ISelectionNode;

aspect Selection {

	/*
	 * The ISelectionNode interface need to be implemented by ASTNode
	 * for the AST to provide selection support
	 */
	ASTNode implements ISelectionNode;
	
	/*
	 * Default behavior for selection line and column information
	 */
	syn int ASTNode.selectionLine() = getBeginLine();
	syn int ASTNode.selectionColumn() = getBeginColumn();
	syn int ASTNode.selectionLength() = getEndColumn() - selectionColumn() + 1;
	syn int ASTNode.selectionEndLine() = getEndLine();
	syn int ASTNode.selectionEndColumn() = getEndColumn();
}