class Rouge::Lexers::Ada
Constants
- EXP
- ID
Ada
identifiers are Unicode with underscores only allowed as separators.- NUM
Numerals can also contain underscores.
- XNUM
Public Class Methods
idents()
click to toggle source
Return a hash mapping lower-case identifiers to token classes.
# File lib/rouge/lexers/ada.rb, line 22 def self.idents @idents ||= Hash.new(Name).tap do |h| %w( abort abstract accept access aliased all array at begin body case constant declare delay delta digits do else elsif end exception exit for generic goto if in interface is limited loop new null of others out overriding pragma private protected raise range record renames requeue return reverse select separate some synchronized tagged task terminate then until use when while with ).each {|w| h[w] = Keyword} %w(abs and mod not or rem xor).each {|w| h[w] = Operator::Word} %w( entry function package procedure subtype type ).each {|w| h[w] = Keyword::Declaration} %w( boolean character constraint_error duration float integer natural positive long_float long_integer long_long_float long_long_integer program_error short_float short_integer short_short_integer storage_error string tasking_error wide_character wide_string wide_wide_character wide_wide_string ).each {|w| h[w] = Name::Builtin} end end