lib/opulent/tokens.rb in opulent-1.4.0 vs lib/opulent/tokens.rb in opulent-1.4.1

- old
+ new

@@ -1,8 +1,8 @@ module Opulent # Opulent Keywords - Keywords = %i(def block yield require if else elsif unless case when each while until doctype) + Keywords = %i(def yield include if else elsif unless case when each while until doctype) # @Tokens class Tokens # All tokens available within Opulent # @@ -28,14 +28,14 @@ # Definition def: /\Adef +/, # Definition - doctype: /\Adoctype +/, + doctype: /\Adoctype */, - # Require file - require: /\Arequire +/, + # Include file + include: /\Ainclude +/, # Node Attributes attributes_bracket: /\A\(\[\{/, extend_attributes: /\A(\+)/, @@ -67,17 +67,13 @@ # HTML Text html_text: /\A\<.+\>.*/, # Yield yield: /\A(yield)/, - yield_identifier: /\A[a-zA-Z]([\_]?[a-zA-Z0-9]+)*/, - # Yield - block: /\A(block)/, - # Conditional Structures control: /\A(if|elsif|else|unless|case|when|each|while|until)/, - each_pattern: /\A(\w+( *, *\w+)?)? +in +.+/, + each_pattern: /\A(.+) +do *\|(.+)\|/, # Text text: /\A\|/, # Brackets