2014-06-18 23:27:05 +02:00
ace . define ( "ace/mode/ruby" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/mode/text" , "ace/mode/ruby_highlight_rules" , "ace/mode/matching_brace_outdent" , "ace/range" , "ace/mode/folding/coffee" ] , function ( e , t , n ) { var r = e ( "../lib/oop" ) , i = e ( "./text" ) . Mode , s = e ( "./ruby_highlight_rules" ) . RubyHighlightRules , o = e ( "./matching_brace_outdent" ) . MatchingBraceOutdent , u = e ( "../range" ) . Range , a = e ( "./folding/coffee" ) . FoldMode , f = function ( ) { this . HighlightRules = s , this . $outdent = new o , this . foldingRules = new a } ; r . inherits ( f , i ) , function ( ) { this . lineCommentStart = "#" , this . getNextLineIndent = function ( e , t , n ) { var r = this . $getIndent ( t ) , i = this . getTokenizer ( ) . getLineTokens ( t , e ) , s = i . tokens ; if ( s . length && s [ s . length - 1 ] . type == "comment" ) return r ; if ( e == "start" ) { var o = t . match ( /^.*[\{\(\[]\s*$/ ) , u = t . match ( /^\s*(class|def|module)\s.*$/ ) , a = t . match ( /.*do(\s*|\s+\|.*\|\s*)$/ ) , f = t . match ( /^\s*(if|else)\s*/ ) ; if ( o || u || a || f ) r += n } return r } , this . checkOutdent = function ( e , t , n ) { return /^\s+end$/ . test ( t + n ) || /^\s+}$/ . test ( t + n ) || /^\s+else$/ . test ( t + n ) } , this . autoOutdent = function ( e , t , n ) { var r = this . $getIndent ( t . getLine ( n ) ) , i = t . getTabString ( ) ; r . slice ( - i . length ) == i && t . remove ( new u ( n , r . length - i . length , n , r . length ) ) } , this . $id = "ace/mode/ruby" } . call ( f . prototype ) , t . Mode = f } ) , ace . define ( "ace/mode/ruby_highlight_rules" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/mode/text_highlight_rules" ] , function ( e , t , n ) { var r = e ( "../lib/oop" ) , i = e ( "./text_highlight_rules" ) . TextHighlightRules , s = t . constantOtherSymbol = { token : "constant.other.symbol.ruby" , regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" } , o = t . qString = { token : "string" , regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" } , u = t . qqString = { token : "string" , regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' } , a = t . tString = { token : "string" , regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" } , f = t . constantNumericHex = { token : "constant.numeric" , regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" } , l = t . constantNumericFloat = { token : "constant.numeric" , regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" } , c = function ( ) { var e = " 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 | attr _accessible | 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 | form _for | form _tag | format | gets | global _variables | gsub | gsub ! | get _via _redirect | host ! | https ? | https ! | include | Integer | lambda | link _to | link _to _unless _current | 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 | stylesheet _link _tag | syscall | system | sub | sub ! | test | throw | trace _var | trap | untrace _var | atan2 | cos | exp | frexp | ldexp | log | log10 | sin | sqrt | tan | render | javascript _include _tag | csrf _meta _tag | label _tag | text _field _tag | submit _tag | check _box _tag | content _tag | radio _button _tag | text _area _tag | password _field _tag | hidden _field _tag | fields _for | select _tag | options _for _select | options _from _collection _for _select | collection _select | time _zone _select | select _date | select _time | select _datetime | date _select | time _select | datetime _select | select _year | select _month | select _day | select _hour | select _minute | select _second | file _field _tag | file _field | respond _to | skip _before _filter | around _filter | after _filter | verify | protect _from _forgery | rescue _from | helper _method | redirect _to | before _filter | send _data | send _file | validates _presence _of | validates _uniqueness _of | validates _length _of | validates _format _of | validates _acceptance _of | validates _associated | validates _exclusion _of | validates _in