Changed the typeRe regular expression to be more strict.
This commit is contained in:
parent
ae26fe31a0
commit
a4e1ab55f0
1 changed files with 4 additions and 4 deletions
|
|
@ -82,8 +82,8 @@ function BracketMatch() {
|
|||
// matches any token containing the same identifiers or a subset. In
|
||||
// addition, if token.type includes "rparen", then also match "lparen".
|
||||
// So if type.token is "paren.rparen", then typeRe will match "lparen.paren".
|
||||
var typeRe = new RegExp("(\\.?[" +
|
||||
token.type.replace(".", "|").replace("rparen", "lparen|rparen") + "])+");
|
||||
var typeRe = new RegExp("(\\.?" +
|
||||
token.type.replace(".", "|").replace("rparen", "lparen|rparen") + ")+");
|
||||
|
||||
// Start searching in token, just before the character at position.column
|
||||
var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;
|
||||
|
|
@ -135,8 +135,8 @@ function BracketMatch() {
|
|||
// matches any token containing the same identifiers or a subset. In
|
||||
// addition, if token.type includes "lparen", then also match "rparen".
|
||||
// So if type.token is "lparen.paren", then typeRe will match "paren.rparen".
|
||||
var typeRe = new RegExp("(\\.?[" +
|
||||
token.type.replace(".", "|").replace("lparen", "lparen|rparen") + "])+");
|
||||
var typeRe = new RegExp("(\\.?" +
|
||||
token.type.replace(".", "|").replace("lparen", "lparen|rparen") + ")+");
|
||||
|
||||
// Start searching in token, after the character at position.column
|
||||
var valueIndex = position.column - iterator.getCurrentTokenColumn();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue