Skip to content
Permalink
Browse files
8223898: Forward references to Nashorn
Reviewed-by: sundar, mschoene, rhalade
  • Loading branch information
hns committed Nov 6, 2019
1 parent 740e70b commit 0e4b718a2521c7d46e09d4cc3427f529b271b516
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -141,14 +141,14 @@ public static RegExpScanner scan(final String string) {
throw new PatternSyntaxException(e.getMessage(), string, scanner.position);
}

scanner.processForwardReferences();

// Throw syntax error unless we parsed the entire JavaScript regexp without syntax errors
if (scanner.position != string.length()) {
final String p = scanner.getStringBuilder().toString();
throw new PatternSyntaxException(string, p, p.length() + 1);
}

scanner.processForwardReferences();

return scanner;
}

0 comments on commit 0e4b718

Please sign in to comment.