1 34 package org.codehaus.groovy.syntax.parser; 35 36 import groovy.util.GroovyTestCase; 37 38 import org.codehaus.groovy.ast.ModuleNode; 39 import org.codehaus.groovy.control.SourceUnit; 40 41 42 43 49 public abstract class TestParserSupport extends GroovyTestCase { 50 51 public ModuleNode parse(String text, String description) throws Exception { 52 SourceUnit unit = SourceUnit.create( description, text ); 53 unit.parse(); 54 unit.convert(); 55 56 return unit.getAST(); 57 } 58 } 59 | Popular Tags |