MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / readToken

Method readToken

src/main/java/net/optifine/expr/TokenParser.java:45–71  ·  view source on GitHub ↗
(char chFirst, TokenType type, PushbackReader pr)

Source from the content-addressed store, hash-verified

43 }
44
45 private static Token readToken(char chFirst, TokenType type, PushbackReader pr) throws IOException
46 {
47 StringBuffer stringbuffer = new StringBuffer();
48 stringbuffer.append(chFirst);
49
50 while (true)
51 {
52 int i = pr.read();
53
54 if (i < 0)
55 {
56 break;
57 }
58
59 char c0 = (char)i;
60
61 if (!type.hasCharNext(c0))
62 {
63 pr.unread(c0);
64 break;
65 }
66
67 stringbuffer.append(c0);
68 }
69
70 return new Token(type, stringbuffer.toString());
71 }
72}

Callers 1

parseMethod · 0.95

Calls 3

hasCharNextMethod · 0.80
readMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected