Skip to content

Commit

Permalink
PuppetManifest: resource names can contain an underscore.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahakanbaba committed Oct 6, 2018
1 parent 3e6ac83 commit 3a62a02
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ o_ne::tw_o input.pp /^define o_ne::tw_o {$/;" definition line:15 language:Puppet
o_ne::two_ input.pp /^define o_ne::two_ {$/;" definition line:19 language:PuppetManifest end:21
/tmp/multipledefineo_netwo_ input.pp /^ file { "\/tmp\/multipledefineo_netwo_": content => "two" }$/;" resource line:20 language:PuppetManifest scope:definition:o_ne::two_ end:20
t input.pp /^t { 't': }$/;" resource line:23 language:PuppetManifest end:23
one_ input.pp /^one_ { 'one_': }$/;" resource line:24 language:PuppetManifest end:24
on_e input.pp /^on_e { 'on_e': }$/;" resource line:25 language:PuppetManifest end:25
o_ne::tw_o input.pp /^o_ne::tw_o { 'o_ne::tw_o': }$/;" resource line:26 language:PuppetManifest end:26
o_ne::two_ input.pp /^o_ne::two_ { 'o_ne::two_': }$/;" resource line:27 language:PuppetManifest end:27
12 changes: 6 additions & 6 deletions optlib/puppetManifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ static void initializePuppetManifestParser (const langType language CTAGS_ATTR_U
"^\\$",
"", "", "{tenter=var}", NULL);
addLanguageTagMultiTableRegex (language, "main",
"^@?::[a-zA-Z0-9:]+[ \t\n]*\\{",
"^@?::[a-zA-Z0-9:_]+[ \t\n]*\\{",
"", "", "{tenter=resourceBlock}", NULL);
addLanguageTagMultiTableRegex (language, "main",
"^@?[a-zA-Z][a-zA-Z0-9:]*[ \t\n]*\\{",
"^@?[a-zA-Z][a-zA-Z0-9:_]*[ \t\n]*\\{",
"", "", "{tenter=resourceBlock}", NULL);
addLanguageTagMultiTableRegex (language, "main",
"^class[ \t\n]+",
Expand Down Expand Up @@ -132,10 +132,10 @@ static void initializePuppetManifestParser (const langType language CTAGS_ATTR_U
"^\\#",
"", "", "{tenter=comment_oneline}", NULL);
addLanguageTagMultiTableRegex (language, "blockStart",
"^@?::[a-zA-Z0-9:]+[ \t\n]*\\{",
"^@?::[a-zA-Z0-9:_]+[ \t\n]*\\{",
"", "", "{tenter=resourceBlock}", NULL);
addLanguageTagMultiTableRegex (language, "blockStart",
"^@?[a-zA-Z][a-zA-Z0-9:]*[ \t\n]*\\{",
"^@?[a-zA-Z][a-zA-Z0-9:_]*[ \t\n]*\\{",
"", "", "{tenter=resourceBlock}", NULL);
addLanguageTagMultiTableRegex (language, "blockStart",
"^class[ \t\n]+",
Expand Down Expand Up @@ -195,10 +195,10 @@ static void initializePuppetManifestParser (const langType language CTAGS_ATTR_U
"^<<?\\|",
"", "", "{tenter=skipCollector}", NULL);
addLanguageTagMultiTableRegex (language, "block",
"^@?::[a-zA-Z0-9:]+[ \t\n]*\\{",
"^@?::[a-zA-Z0-9:_]+[ \t\n]*\\{",
"", "", "{tenter=resourceBlock}", NULL);
addLanguageTagMultiTableRegex (language, "block",
"^@?[a-zA-Z][a-zA-Z0-9:]*[ \t\n]*\\{",
"^@?[a-zA-Z][a-zA-Z0-9:_]*[ \t\n]*\\{",
"", "", "{tenter=resourceBlock}", NULL);
addLanguageTagMultiTableRegex (language, "block",
"^class[ \t\n]+",
Expand Down
4 changes: 2 additions & 2 deletions optlib/puppetManifest.ctags
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@
#
# block
#
--_mtable-regex-PuppetManifest=blockStart/@?::[a-zA-Z0-9:]+[ \t\n]*\{//{tenter=resourceBlock}
--_mtable-regex-PuppetManifest=blockStart/@?[a-zA-Z][a-zA-Z0-9:]*[ \t\n]*\{//{tenter=resourceBlock}
--_mtable-regex-PuppetManifest=blockStart/@?::[a-zA-Z0-9:_]+[ \t\n]*\{//{tenter=resourceBlock}
--_mtable-regex-PuppetManifest=blockStart/@?[a-zA-Z][a-zA-Z0-9:_]*[ \t\n]*\{//{tenter=resourceBlock}
--_mtable-regex-PuppetManifest=blockStart/class[ \t\n]+//{tenter=classStart}
--_mtable-regex-PuppetManifest=blockStart/define[ \t\n]+//{tenter=defineStart}
--_mtable-regex-PuppetManifest=blockStart/case[ \t\n]+//{tenter=caseStart}
Expand Down

0 comments on commit 3a62a02

Please sign in to comment.