diff --git a/lib/rouge/lexers/xpath.rb b/lib/rouge/lexers/xpath.rb index 4538859837..efdcae5d6e 100644 --- a/lib/rouge/lexers/xpath.rb +++ b/lib/rouge/lexers/xpath.rb @@ -109,12 +109,12 @@ def self.constructorTypes end rule /(map|array|empty-sequence)/, Keyword # constructors rule /(#{XPath.kindTest})(\s*)(#{XPath.openParen})/ do # kindtest - push :kindtest groups Keyword, Text::Whitespace, Punctuation + push :kindtest end rule /(#{XPath.kindTestForPi})(\s*)(#{XPath.openParen})/ do # processing instruction kindtest - push :kindtestforpi groups Keyword, Text::Whitespace, Punctuation + push :kindtestforpi end rule /(#{XPath.eqName})(\s*)(#{XPath.openParen})/ do # function call groups Name::Function, Text::Whitespace, Punctuation @@ -125,16 +125,16 @@ def self.constructorTypes # Type commands rule /(cast|castable)(\s+)(as)/ do - goto :singletype groups Keyword, Text::Whitespace, Keyword + goto :singletype end rule /(treat)(\s+)(as)/ do - goto :itemtype groups Keyword, Text::Whitespace, Keyword + goto :itemtype end rule /(instance)(\s+)(of)/ do - goto :itemtype groups Keyword, Text::Whitespace, Keyword + goto :itemtype end rule /\b(as)\b/ do token Keyword @@ -190,8 +190,8 @@ def self.constructorTypes push :kindtestforpi end rule /(item)(\s*)(#{XPath.openParen})(\s*)(\))/ do - goto :occurrenceindicator groups Keyword::Type, Text::Whitespace, Punctuation, Text::Whitespace, Punctuation + goto :occurrenceindicator end rule /(#{XPath.constructorTypes})(\s*)(#{XPath.openParen})/ do groups Keyword::Type, Text::Whitespace, Punctuation @@ -247,8 +247,8 @@ def self.constructorTypes rule /[?*]/, Operator rule /,/, Punctuation rule /(element|schema-element)(\s*)(#{XPath.openParen})/ do - push :kindtest groups Keyword::Type, Text::Whitespace, Punctuation + push :kindtest end rule XPath.eqName, Name::Tag diff --git a/lib/rouge/lexers/xquery.rb b/lib/rouge/lexers/xquery.rb index 82b6fc41f9..28876b523f 100644 --- a/lib/rouge/lexers/xquery.rb +++ b/lib/rouge/lexers/xquery.rb @@ -62,8 +62,8 @@ def self.keywords rule /%/, Keyword::Declaration, :annotation rule /(\(#)(\s*)(#{XPath.eqName})/ do - push :pragma groups Comment::Preproc, Text::Whitespace, Name::Tag + push :pragma end rule /``\[/, Str, :str_constructor @@ -99,12 +99,12 @@ def self.keywords state :start_tag do rule /\s+/m, Text::Whitespace rule /([\w.:-]+\s*=)(")/m do - push :quot_attr groups Name::Attribute, Str + push :quot_attr end rule /([\w.:-]+\s*=)(')/m do - push :apos_attr groups Name::Attribute, Str + push :apos_attr end rule />/, Name::Tag, :tag_content rule %r(/>), Name::Tag, :pop!