logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

rails.lua (2117B)


  1. -- Copyright 2006-2024 Mitchell. See LICENSE.
  2. -- Ruby on Rails LPeg lexer.
  3. local lexer = lexer
  4. local P, S = lpeg.P, lpeg.S
  5. local lex = lexer.new(..., {inherit = lexer.load('ruby')})
  6. -- Word lists.
  7. lex:set_word_list(lexer.FUNCTION_BUILTIN, {
  8. -- ActionPack.
  9. 'before_filter', 'skip_before_filter', 'skip_after_filter', 'after_filter', 'around_filter',
  10. 'filter', 'filter_parameter_logging', 'layout', 'require_dependency', 'render', 'render_action',
  11. 'render_text', 'render_file', 'render_template', 'render_nothing', 'render_component',
  12. 'render_without_layout', 'rescue_from', 'url_for', 'redirect_to', 'redirect_to_path',
  13. 'redirect_to_url', 'respond_to', 'helper', 'helper_method', 'model', 'service', 'observer',
  14. 'serialize', 'scaffold', 'verify', 'hide_action',
  15. -- View helpers.
  16. 'check_box', 'content_for', 'error_messages_for', 'form_for', 'fields_for', 'file_field',
  17. 'hidden_field', 'image_submit_tag', 'label', 'link_to', 'password_field', 'radio_button',
  18. 'submit', 'text_field', 'text_area',
  19. -- ActiveRecord.
  20. 'after_create', 'after_destroy', 'after_save', 'after_update', 'after_validation',
  21. 'after_validation_on_create', 'after_validation_on_update', 'before_create', 'before_destroy',
  22. 'before_save', 'before_update', 'before_validation', 'before_validation_on_create',
  23. 'before_validation_on_update', 'composed_of', 'belongs_to', 'has_one', 'has_many',
  24. 'has_and_belongs_to_many', 'validate', 'validates', 'validate_on_create',
  25. 'validates_numericality_of', 'validate_on_update', 'validates_acceptance_of',
  26. 'validates_associated', 'validates_confirmation_of', 'validates_each', 'validates_format_of',
  27. 'validates_inclusion_of', 'validates_exclusion_of', 'validates_length_of',
  28. 'validates_presence_of', 'validates_size_of', 'validates_uniqueness_of', --
  29. 'attr_protected', 'attr_accessible', 'attr_readonly', 'accepts_nested_attributes_for',
  30. 'default_scope', 'scope',
  31. -- ActiveSupport.
  32. 'alias_method_chain', 'alias_attribute', 'delegate', 'cattr_accessor', 'mattr_accessor',
  33. 'returning', 'memoize'
  34. }, true)
  35. lexer.property['scintillua.comment'] = '#'
  36. return lex