Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ECL lexer #1396

Merged
merged 17 commits into from
Feb 20, 2020
5 changes: 4 additions & 1 deletion lib/rouge/lexers/ecl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def self.typed
rule %r([\[\]{}();,\&,\.,\%]), Punctuation

rule %r(\b(?i:(beginc\+\+.*?endc\+\+)))m, Str::Single
rule %r(\b(?i:(embed.*?endembed)))m, Str::Single
rule %r(\b(embed)([(])(.*?)([)])(.*?)(endembed))im do |m|
groups Keyword, Punctuation, Name::Other, Punctuation, Name::Other, Keyword
pyrmont marked this conversation as resolved.
Show resolved Hide resolved
end

rule %r(\b(\w+)\.(\w+)\.(\w+)) do |m|
if m[1] == "std" &&
self.class.class_first.include?(m[2]) &&
Expand Down