class Rouge::Lexers::Awk

Public Class Methods

analyze_text(text) click to toggle source
# File lib/rouge/lexers/awk.rb, line 12
def self.analyze_text(text)
  return 1 if text.shebang?('awk')
end
builtins() click to toggle source
# File lib/rouge/lexers/awk.rb, line 40
def self.builtins
  @builtins ||= %w(
    exp log sqrt sin cos atan2 length rand srand int substr index match
    split sub gsub sprintf system tolower toupper
  )
end
constants() click to toggle source
# File lib/rouge/lexers/awk.rb, line 33
def self.constants
  @constants ||= Set.new %w(
    CONVFMT FS NF NR FNR FILENAME RS OFS ORS OFMT SUBSEP ARGC ARGV
    ENVIRON
  )
end
declarations() click to toggle source
# File lib/rouge/lexers/awk.rb, line 25
def self.declarations
  @declarations ||= Set.new %w(function)
end
keywords() click to toggle source
# File lib/rouge/lexers/awk.rb, line 18
def self.keywords
  @keywords ||= Set.new %w(
    if else while for do break continue return next nextfile delete
    exit print printf getline
  )
end
reserved() click to toggle source
# File lib/rouge/lexers/awk.rb, line 29
def self.reserved
  @reserved ||= Set.new %w(BEGIN END)
end