Class: Rouge::Lexers::Meson

Inherits:
RegexLexer show all
Defined in:
lib/rouge/lexers/meson.rb

Constant Summary

Constants inherited from RegexLexer

RegexLexer::MAX_NULL_SCANS

Constants included from Token::Tokens

Token::Tokens::Num, Token::Tokens::Str

Instance Attribute Summary

Attributes inherited from Rouge::Lexer

#options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RegexLexer

append, #delegate, #goto, #group, #groups, #in_state?, #pop!, prepend, #push, #recurse, replace_state, #reset!, #reset_stack, #stack, start, start_procs, state, #state, #state?, state_definitions, states, #step, #stream_tokens, #token

Methods inherited from Rouge::Lexer

aliases, all, #as_bool, #as_lexer, #as_list, #as_string, #as_token, #bool_option, continue_lex, #continue_lex, debug_enabled?, demo, demo_file, desc, detect?, detectable?, disable_debug!, enable_debug!, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #hash_option, #initialize, lex, #lex, #lexer_option, #list_option, lookup_fancy, mimetypes, option, option_docs, #reset!, #stream_tokens, #string_option, tag, #tag, title, #token_option, #with

Methods included from Token::Tokens

token

Constructor Details

This class inherits a constructor from Rouge::Lexer

Class Method Details

.builtin_functionsObject



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/rouge/lexers/meson.rb', line 26

def self.builtin_functions
  @builtin_functions ||= %w(
    add_global_arguments add_project_arguments
    add_global_link_arguments add_project_link_arguments add_test_setup add_languages
    alias_target assert benchmark both_libraries build_target configuration_data configure_file
    custom_target declare_dependency dependency disabler environment error executable
    generator gettext get_option get_variable files find_library find_program
    include_directories import install_data install_headers install_man install_subdir
    is_disabler is_variable jar join_paths library message option project
    run_target run_command set_variable subdir subdir_done
    subproject summary shared_library shared_module static_library test vcs_tag warning
  )
end

.builtin_variablesObject



20
21
22
23
24
# File 'lib/rouge/lexers/meson.rb', line 20

def self.builtin_variables
  @builtin_variables ||= %w(
    meson host_machine build_machine target_machine
  )
end

.keywordsObject



13
14
15
16
17
18
# File 'lib/rouge/lexers/meson.rb', line 13

def self.keywords
  @keywords ||= %w(
    continue break elif else endif
    if true false foreach endforeach
  )
end

Instance Method Details

#current_stringObject



42
43
44
# File 'lib/rouge/lexers/meson.rb', line 42

def current_string
  @current_string ||= StringRegister.new
end