Skip to content

Commit

Permalink
add some Rails things
Browse files Browse the repository at this point in the history
  • Loading branch information
Heigh Tech LLC authored and fjakobs committed Mar 21, 2011
1 parent 71969c2 commit 1abfd5f
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions lib/ace/mode/ruby_highlight_rules.js
Expand Up @@ -45,20 +45,32 @@ var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightR
var RubyHighlightRules = function() {

var builtinFunctions = lang.arrayToMap(
("abort|Array|at_exit|attr|attr_writer|attr_reader|attr_accessor|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|eval|exec|exit|exit!" +
"fail|Float|fork|format|gem|gets|global_variables|gsub|gsub!|include|Integer|lambda|load|local_variables|loop|open|p|print|" +
"printf|proc|putc|puts|raise|rand|readline|readlines|require|scan|select|set_trace_func|sleep|split|sprintf|srand|" +
"String|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|" +
"atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan").split("|")
("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
"assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
"assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
"assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
"assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
"assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
"attr|attr_writer|attr_reader|attr_accessor|autoload|binding|block_given?|callcc|" +
"caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
"exit!|fail|Float|flunk|follow_redirect!|fork|format|gets|global_variables|gsub|" +
"gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
"link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
"p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
"raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
"set_trace_func|sleep|split|sprintf|srand|String|syscall|system|sub|sub!|test|" +
"throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan").split("|")
);

var keywords = lang.arrayToMap(
("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|" +
"if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield").split("|")
("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
"__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
"redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield").split("|")
);

var buildinConstants = lang.arrayToMap(
("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING").split("|")
("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
"RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING").split("|")
);

var builtinVariables = lang.arrayToMap(
Expand Down

0 comments on commit 1abfd5f

Please sign in to comment.