mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Loop invariant optimization
This commit is contained in:
@@ -905,13 +905,14 @@ public class DeclarationParsing extends Parsing {
|
||||
if (tokenType != JavaTokenType.SEMICOLON && tokenType != JavaTokenType.LBRACE){
|
||||
CompositeElement invalidElementsGroup = Factory.createErrorElement(JavaErrorMessages.message("expected.lbrace.or.semicolon"));
|
||||
method.rawAddChildren(invalidElementsGroup);
|
||||
|
||||
final CharSequence buf = lexer.getBufferSequence();
|
||||
Loop:
|
||||
while(true){
|
||||
tokenType = lexer.getTokenType();
|
||||
|
||||
// Heuristic. Going to next line obviously means method signature is over, starting new method.
|
||||
// Necessary for correct CompleteStatementTest operation.
|
||||
final CharSequence buf = lexer.getBufferSequence();
|
||||
int start = lexer.getTokenStart();
|
||||
for (int i = start - 1; i >= 0; i--) {
|
||||
if (buf.charAt(i) == '\n') break Loop;
|
||||
|
||||
Reference in New Issue
Block a user