Skip to content

Commit

Permalink
[python mode] Parse ... as an operator
Browse files Browse the repository at this point in the history
To avoid treating it like 3 separate dot tokens

Closes #5861
  • Loading branch information
marijnh committed Apr 26, 2019
1 parent d76b461 commit a6ed84f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/python/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
var delimiters = parserConf.delimiters || parserConf.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/;
// (Backwards-compatiblity with old, cumbersome config system)
var operators = [parserConf.singleOperators, parserConf.doubleOperators, parserConf.doubleDelimiters, parserConf.tripleDelimiters,
parserConf.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/]
parserConf.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/]
for (var i = 0; i < operators.length; i++) if (!operators[i]) operators.splice(i--, 1)

var hangingIndent = parserConf.hangingIndent || conf.indentUnit;
Expand Down

0 comments on commit a6ed84f

Please sign in to comment.