PageRenderTime 17ms CodeModel.GetById 9ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/src/org/ooc/frontend/parser/CommentParser.java

http://github.com/nddrylliog/ooc
Java | 24 lines | 17 code | 7 blank | 0 comment | 2 complexity | f43d54297947d27bad4d9735a7a80625 MD5 | raw file
 1package org.ooc.frontend.parser;
 2
 3import org.ooc.frontend.model.OocDocComment;
 4import org.ooc.frontend.model.Visitable;
 5import org.ooc.frontend.model.tokens.Token;
 6import org.ooc.frontend.model.tokens.TokenReader;
 7import org.ooc.frontend.model.tokens.Token.TokenType;
 8import org.ubi.SourceReader;
 9
10public class CommentParser {
11
12	public static Visitable parse(SourceReader sReader, TokenReader reader) {
13		
14		Token token = reader.peek();
15		if(token.type == TokenType.OOCDOC) {
16			reader.skip();
17			return new OocDocComment(token.get(sReader), token); // FIXME add oocdoc tags parsing (me=lazy)
18		}
19		
20		return null;
21		
22	}
23	
24}