Skip to content

Commit

Permalink
Merge branch 'fix/#26' of github.com:jeff-hykin/cpp-textmate-grammar …
Browse files Browse the repository at this point in the history
…into fix/#26
  • Loading branch information
matter123 committed May 11, 2019
2 parents a4c3856 + dbc1073 commit 4ff3302
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/generate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@
match: /,/,
tag_as: "comma punctuation.separator.delimiter"
)
# TODO maybe change this tag see https://github.com/jeff-hykin/cpp-textmate-grammar/pull/135#issuecomment-490727262
# TODO eventually move this outside of the # Utils section
ref_deref_definition_pattern = newPattern(
should_fully_match: [ '*', '&', '**', '&&', '*&', '*& ' ],
should_not_partial_match: [ '&*', '&&&' ],
match: newPattern(
match: zeroOrMoreOf(/\*/.maybe(@spaces)),
tag_as: "storage.modifier.pointer"
).then(
# TODO: make a readble regex way to do the {0,2} and replace this with it
match: /(?:\&\s*?){0,2}/,
tag_as: "storage.modifier.reference"
).maybe(@spaces)
)

def blockFinderFor( name:"", tag_as:"", start_pattern:nil, needs_semicolon: true, primary_includes: [], head_includes:[], body_includes: [ :$initial_context ], tail_includes: [ :$initial_context ], secondary_includes:[])
lookahead_endings = /[;>\[\]=]/
if needs_semicolon
Expand Down

0 comments on commit 4ff3302

Please sign in to comment.