* @param contentOffset the offset of the contents in the larger file
* @return the first Dart token
*/
public static com.google.dart.engine.scanner.Token scanDartSource(Source source,
LineInfo lineInfo, String contents, int contentOffset, AnalysisErrorListener errorListener) {
Location location = lineInfo.getLocation(contentOffset);
Scanner scanner = new Scanner(
source,
new SubSequenceReader(contents, contentOffset),
errorListener);
scanner.setSourceStart(location.getLineNumber(), location.getColumnNumber());
return scanner.tokenize();
}