-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3686 from masatake/optscript--foreignreftag
Optscript: add _foreignreftag operator
- Loading branch information
Showing
8 changed files
with
135 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--sort=no | ||
--extras=+r | ||
--fields=+rl | ||
|
||
--langdef=XXX{_foreignLanguage=C} | ||
--map-XXX=.xxx | ||
--kinddef-XXX=a,abc,abcx | ||
--_roledef-XXX.a=assigned,assigned | ||
|
||
--regex-XXX=/^(a)$/\1/a/ | ||
|
||
--regex-XXX=/^(b)$//{{ | ||
\1 /abc _tag _commit pop | ||
}} | ||
--regex-XXX=/^(c)$/\1/a/{_role=assigned} | ||
--regex-XXX=/^(d)$//{{ | ||
\1 /abc /assigned _reftag _commit pop | ||
}} | ||
|
||
--_roledef-C.f=arolefortesting,a role for testing | ||
--regex-XXX=/\/\*(A)\(\)\*\//\1/f/{_language=C} | ||
--regex-XXX=/\/\*(B)\(\)\*\///{{ | ||
\1 /C /function _foreigntag _commit pop | ||
}} | ||
|
||
--regex-XXX=/\/\*(C)\(\)\*\//\1/f/{_language=C}{_role=arolefortesting} | ||
--regex-XXX=/\/\*(D)\(\)\*\//\1/f/{_role=arolefortesting}{_language=C} | ||
--regex-XXX=/\/\*(E)\(\)\*\///{{ | ||
\1 /C /function /arolefortesting _foreignreftag _commit pop | ||
}} | ||
|
||
--regex-C=/FUNC\(([a-z]*)\);/\1/f/ |
10 changes: 10 additions & 0 deletions
10
Units/optscript.r/with-foreignLanguage-flag.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
a input.xxx /^a$/;" a language:XXX roles:def | ||
b input.xxx /^b$/;" a language:XXX roles:def | ||
c input.xxx /^c$/;" a language:XXX roles:assigned | ||
d input.xxx /^d$/;" a language:XXX roles:assigned | ||
A input.xxx /^\/*A()*\/$/;" f language:C roles:def | ||
B input.xxx /^\/*B()*\/$/;" f language:C roles:def | ||
C input.xxx /^\/*C()*\/$/;" f language:C roles:arolefortesting | ||
D input.xxx /^\/*D()*\/$/;" f language:C roles:arolefortesting | ||
E input.xxx /^\/*E()*\/$/;" f language:C roles:arolefortesting | ||
myfunc input-0.c /^FUNC(myfunc);$/;" f language:C roles:def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FUNC(myfunc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
a | ||
b | ||
c | ||
d | ||
/*A()*/ | ||
/*B()*/ | ||
/*C()*/ | ||
/*D()*/ | ||
/*E()*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters