Skip to content

Commit

Permalink
add back removed :zeroLengthStart?: true
Browse files Browse the repository at this point in the history
  • Loading branch information
matter123 committed Jun 25, 2019
1 parent 0658996 commit 9e77ee5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/languages/cpp/generate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon:
PatternRange.new(
tag_as: "meta.head."+name,
start_pattern: /\G ?/,
zeroLengthStart?: true,
end_pattern: newPattern(
match: @open_curly_brace.or(lookAheadFor(/;/)),
tag_as: "punctuation.section.block.begin.bracket.curly."+name
Expand Down Expand Up @@ -319,6 +320,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon:
PatternRange.new(
# the first position
start_pattern: lookAheadFor(/^/),
zeroLengthStart?: true,
# ensure end never matches
# why? because textmate will keep looking until it hits the end of the file (which is the purpose of this wrapper)
# how? because the regex is trying to find "not" and then checks to see if "not" == "possible" (which can never happen)
Expand Down

0 comments on commit 9e77ee5

Please sign in to comment.