├── .travis.yml ├── lib └── ace │ ├── snippets │ ├── d.snippets │ ├── abap.snippets │ ├── ada.snippets │ ├── cobol.snippets │ ├── csharp.snippets │ ├── curly.snippets │ ├── dot.snippets │ ├── ejs.snippets │ ├── forth.snippets │ ├── ftl.snippets │ ├── glsl.snippets │ ├── golang.snippets │ ├── groovy.snippets │ ├── haxe.snippets │ ├── ini.snippets │ ├── jade.snippets │ ├── json.snippets │ ├── jsoniq.snippets │ ├── jsx.snippets │ ├── julia.snippets │ ├── latex.snippets │ ├── less.snippets │ ├── liquid.snippets │ ├── lisp.snippets │ ├── logiql.snippets │ ├── luapage.snippets │ ├── lucene.snippets │ ├── matlab.snippets │ ├── mysql.snippets │ ├── ocaml.snippets │ ├── pascal.snippets │ ├── pgsql.snippets │ ├── prolog.snippets │ ├── rdoc.snippets │ ├── rhtml.snippets │ ├── rust.snippets │ ├── sass.snippets │ ├── scad.snippets │ ├── scala.snippets │ ├── scheme.snippets │ ├── scss.snippets │ ├── stylus.snippets │ ├── svg.snippets │ ├── text.snippets │ ├── toml.snippets │ ├── twig.snippets │ ├── verilog.snippets │ ├── xml.snippets │ ├── xquery.snippets │ ├── yaml.snippets │ ├── asciidoc.snippets │ ├── assembly_x86.snippets │ ├── autohotkey.snippets │ ├── batchfile.snippets │ ├── c9search.snippets │ ├── coldfusion.snippets │ ├── html_ruby.snippets │ ├── livescript.snippets │ ├── mushcode.snippets │ ├── objectivec.snippets │ ├── powershell.snippets │ ├── properties.snippets │ ├── tmsnippet.snippets │ ├── typescript.snippets │ ├── vbscript.snippets │ ├── velocity.snippets │ ├── mushcode_high_rules.snippets │ ├── makefile.snippets │ ├── ledger.snippets │ ├── d.js │ ├── r.js │ ├── sh.js │ ├── abap.js │ ├── ada.js │ ├── css.js │ ├── dart.js │ ├── diff.js │ ├── dot.js │ ├── ejs.js │ ├── ftl.js │ ├── glsl.js │ ├── haml.js │ ├── haxe.js │ ├── html.js │ ├── ini.js │ ├── jade.js │ ├── java.js │ ├── json.js │ ├── jsp.js │ ├── jsx.js │ ├── less.js │ ├── lisp.js │ ├── lsl.js │ ├── lua.js │ ├── perl.js │ ├── php.js │ ├── rdoc.js │ ├── ruby.js │ ├── rust.js │ ├── sass.js │ ├── scad.js │ ├── scss.js │ ├── sql.js │ ├── svg.js │ ├── tcl.js │ ├── tex.js │ ├── text.js │ ├── toml.js │ ├── twig.js │ ├── xml.js │ ├── yaml.js │ ├── c_cpp.js │ ├── cobol.js │ ├── curly.js │ ├── forth.js │ ├── julia.js │ ├── latex.js │ ├── mysql.js │ ├── ocaml.js │ ├── pgsql.js │ ├── rhtml.js │ ├── scala.js │ ├── clojure.js │ ├── coffee.js │ ├── csharp.js │ ├── django.js │ ├── erlang.js │ ├── golang.js │ ├── groovy.js │ ├── haskell.js │ ├── jsoniq.js │ ├── liquid.js │ ├── logiql.js │ ├── luapage.js │ ├── lucene.js │ ├── matlab.js │ ├── pascal.js │ ├── prolog.js │ ├── python.js │ ├── scheme.js │ ├── stylus.js │ ├── textile.js │ ├── verilog.js │ ├── xquery.js │ ├── asciidoc.js │ ├── batchfile.js │ ├── c9search.js │ ├── html_ruby.js │ ├── makefile.js │ ├── markdown.js │ ├── mushcode.js │ ├── snippets.js │ ├── vbscript.js │ ├── velocity.js │ ├── autohotkey.js │ ├── coldfusion.js │ ├── javascript.js │ ├── livescript.js │ ├── objectivec.js │ ├── powershell.js │ ├── properties.js │ ├── typescript.js │ ├── actionscript.js │ ├── assembly_x86.js │ ├── snippets.snippets │ ├── mushcode_high_rules.js │ ├── haml.snippets │ ├── rst.snippets │ ├── diff.snippets │ ├── lua.snippets │ ├── textile.snippets │ ├── apache.snippets │ ├── sql.snippets │ ├── mako.snippets │ ├── cmake.snippets │ ├── htmltornado.snippets │ ├── falcon.snippets │ ├── autoit.snippets │ └── dart.snippets │ ├── mode │ ├── _test │ │ ├── text_livescript.txt │ │ ├── tokens_livescript.json │ │ ├── text_html.txt │ │ ├── package.json │ │ ├── text_xml.txt │ │ ├── text_curly.txt │ │ ├── Readme.md │ │ ├── text_markdown.txt │ │ ├── tokens_coldfusion.json │ │ ├── text_lucene.txt │ │ ├── tokens_csharp.json │ │ ├── text_ruby.txt │ │ ├── tokens_xquery.json │ │ ├── tokens_xml.json │ │ ├── tokens_jsx.json │ │ ├── tokens_sql.json │ │ ├── tokens_html.json │ │ ├── tokens_curly.json │ │ └── text_coffee.txt │ ├── xquery │ │ └── Readme.md │ ├── lucene.js │ ├── luapage.js │ ├── latex.js │ ├── groovy.js │ ├── java.js │ ├── scala.js │ ├── latex_highlight_rules.js │ ├── luapage_highlight_rules.js │ ├── rdoc.js │ ├── lucene_highlight_rules.js │ └── tex.js │ ├── css │ ├── expand-marker.png │ └── codefolding-fold-button-states.png │ ├── test │ ├── asyncjs │ │ ├── index.js │ │ └── utils.js │ ├── mockdom.js │ └── tests.html │ ├── ext │ ├── static.css │ ├── themelist_utils │ │ └── themes.js │ ├── menu_tools │ │ └── settings_menu.css │ └── statusbar.js │ ├── lib │ ├── fixoldbrowsers.js │ └── net.js │ ├── worker │ └── mirror.js │ └── theme │ ├── chaos.js │ └── ambiance.js ├── demo ├── kitchen-sink │ ├── docs │ │ ├── lucene.lucene │ │ ├── AsciiDoc.asciidoc │ │ ├── csharp.cs │ │ ├── coldfusion.cfm │ │ ├── xquery.xq │ │ ├── javascript.js │ │ ├── sql.sql │ │ ├── jsx.jsx │ │ ├── julia.jl │ │ ├── twig.twig │ │ ├── batchfile.bat │ │ ├── html.html │ │ ├── curly.curly │ │ ├── OpenSCAD.scad │ │ ├── php.php │ │ ├── java.java │ │ ├── logiql.logic │ │ ├── scss.scss │ │ ├── coffeescript.coffee │ │ ├── Haxe.hx │ │ ├── textile.textile │ │ ├── powershell.ps1 │ │ ├── snippets.snippets │ │ ├── tex.tex │ │ ├── python.py │ │ ├── erlang.erl │ │ ├── prolog.plg │ │ ├── css.css │ │ ├── rhtml.Rhtml │ │ ├── rust.rs │ │ ├── assembly_x86.asm │ │ ├── glsl.glsl │ │ ├── haskell.hs │ │ ├── html_ruby.erb │ │ ├── ocaml.ml │ │ ├── scheme.scm │ │ ├── properties.properties │ │ ├── less.less │ │ ├── ruby.rb │ │ ├── lisp.lisp │ │ ├── r.r │ │ ├── toml.toml │ │ ├── jade.jade │ │ ├── golang.go │ │ ├── perl.pl │ │ ├── clojure.clj │ │ ├── autohotkey.ahk │ │ ├── c9search.c9search_results │ │ ├── yaml.yaml │ │ ├── stylus.styl │ │ ├── sass.sass │ │ ├── cpp.cpp │ │ ├── latex.tex │ │ ├── velocity.vm │ │ ├── vbscript.vbs │ │ ├── tcl.tcl │ │ ├── haml.haml │ │ ├── abap.abap │ │ ├── lua.lua │ │ ├── forth.frt │ │ ├── freemarker.ftl │ │ ├── dart.dart │ │ ├── groovy.groovy │ │ ├── sh.sh │ │ ├── jsp.jsp │ │ ├── actionscript.as │ │ ├── json.json │ │ ├── pascal.pas │ │ └── mushcode.mc │ ├── logo.png │ ├── icons │ │ ├── error_obj.gif │ │ ├── warning_obj.gif │ │ └── Readme.txt │ └── styles.css ├── demo_helper.js ├── requirejs+build.html ├── settings_menu.html ├── static-highlighter │ ├── server.js │ └── client.html ├── keyboard_shortcuts.html ├── modelist.html └── statusbar.html ├── doc ├── site │ ├── images │ │ ├── ace.png │ │ ├── logo.png │ │ ├── ac-logo.png │ │ ├── ace-logo.png │ │ ├── ace-tab.png │ │ ├── codiad.png │ │ ├── favicon.ico │ │ ├── lws-logo.png │ │ ├── plunker.png │ │ ├── sx-logo.png │ │ ├── background.png │ │ ├── bottombar.png │ │ ├── empty-logo.png │ │ ├── header-bg.png │ │ ├── khan-logo.png │ │ ├── logo_half.png │ │ ├── pixie-logo.png │ │ ├── stypi-logo.png │ │ ├── textimage.png │ │ ├── zorba-logo.png │ │ ├── KERA-med-web.png │ │ ├── acebug-logo.png │ │ ├── cloud9-logo.png │ │ ├── firefox-logo.png │ │ ├── github-logo.png │ │ ├── ideone-logo.png │ │ ├── modx-logo-4.png │ │ ├── repl.it-logo.png │ │ ├── weecod-logo.png │ │ ├── body_background.png │ │ ├── codecademy-logo.png │ │ ├── crunchapp-logo.png │ │ ├── fork_on_github.png │ │ ├── rstudio_logo_64.png │ │ ├── shiftedit-logo.png │ │ ├── spandexio-logo.png │ │ ├── FineCut_small_logo.png │ │ ├── sassmeister-logo.png │ │ └── wolf_3d_logo_trans.png │ ├── iphone.css │ └── js │ │ └── ga.js ├── Contributor_License_Agreement-v2.pdf ├── template │ ├── resources │ │ ├── images │ │ │ ├── Ace_ERD.png │ │ │ ├── ace_logo.png │ │ │ ├── footer-bg.png │ │ │ ├── main_bg.png │ │ │ ├── menu_disc.png │ │ │ ├── method_bg.png │ │ │ ├── c9-sponsor.png │ │ │ ├── cloud9-logo.png │ │ │ ├── content-top.png │ │ │ ├── content_bg.png │ │ │ ├── dashed_back.png │ │ │ ├── ace_logo_menu.png │ │ │ ├── c9-log-footer.png │ │ │ ├── content_top_bg.png │ │ │ ├── member-sprites.png │ │ │ ├── sidebar-top-bg.png │ │ │ ├── sidebar_border.png │ │ │ ├── swirl_divider.png │ │ │ └── scrolled-heading-shadow.png │ │ ├── font │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ └── javascripts │ │ │ ├── prettify-extension.js │ │ │ ├── disqus-ext.js │ │ │ └── plugins.js │ └── jade │ │ └── layout.jade ├── Corporate_Contributor_License_Agreement-v2.pdf ├── package.json ├── index.md └── README.md ├── experiments ├── zenbg.png ├── worker.js ├── worker.html ├── triple_click.html └── capture.html ├── api ├── resources │ ├── images │ │ ├── Ace_ERD.png │ │ ├── ace_logo.png │ │ ├── main_bg.png │ │ ├── c9-sponsor.png │ │ ├── content_bg.png │ │ ├── footer-bg.png │ │ ├── menu_disc.png │ │ ├── method_bg.png │ │ ├── ace_logo_menu.png │ │ ├── c9-log-footer.png │ │ ├── cloud9-logo.png │ │ ├── content-top.png │ │ ├── dashed_back.png │ │ ├── swirl_divider.png │ │ ├── content_top_bg.png │ │ ├── member-sprites.png │ │ ├── sidebar-top-bg.png │ │ ├── sidebar_border.png │ │ └── scrolled-heading-shadow.png │ ├── font │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ └── javascripts │ │ ├── prettify-extension.js │ │ ├── disqus-ext.js │ │ └── plugins.js └── index.html ├── version.js ├── .gitmodules ├── tool ├── snippets.tmpl.js ├── package.json ├── tmthemes │ └── LICENSE ├── wrap_keyword_regexp.js ├── lib.js └── theme.tmpl.css ├── .gitignore ├── Makefile ├── package.json ├── static.js └── LICENSE /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js -------------------------------------------------------------------------------- /lib/ace/snippets/d.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/abap.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/ada.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/cobol.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/csharp.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/curly.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/dot.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/ejs.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/forth.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/ftl.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/glsl.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/golang.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/groovy.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/haxe.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/ini.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/jade.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/json.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/jsoniq.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/jsx.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/julia.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/latex.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/less.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/liquid.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/lisp.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/logiql.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/luapage.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/lucene.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/matlab.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/mysql.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/ocaml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/pascal.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/pgsql.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/prolog.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/rdoc.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/rhtml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/rust.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/sass.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/scad.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/scala.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/scheme.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/scss.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/stylus.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/svg.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/text.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/toml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/twig.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/verilog.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/xml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/xquery.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/yaml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/asciidoc.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/assembly_x86.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/autohotkey.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/batchfile.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/c9search.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/coldfusion.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/html_ruby.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/livescript.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/mushcode.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/objectivec.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/powershell.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/properties.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/tmsnippet.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/typescript.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/vbscript.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/velocity.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/snippets/mushcode_high_rules.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/text_livescript.txt: -------------------------------------------------------------------------------- 1 | # comment 2 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/lucene.lucene: -------------------------------------------------------------------------------- 1 | (title:"foo bar" AND body:"quick fox") OR title:fox -------------------------------------------------------------------------------- /doc/site/images/ace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/ace.png -------------------------------------------------------------------------------- /experiments/zenbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/experiments/zenbg.png -------------------------------------------------------------------------------- /doc/site/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/logo.png -------------------------------------------------------------------------------- /demo/kitchen-sink/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/demo/kitchen-sink/logo.png -------------------------------------------------------------------------------- /doc/site/images/ac-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/ac-logo.png -------------------------------------------------------------------------------- /doc/site/images/ace-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/ace-logo.png -------------------------------------------------------------------------------- /doc/site/images/ace-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/ace-tab.png -------------------------------------------------------------------------------- /doc/site/images/codiad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/codiad.png -------------------------------------------------------------------------------- /doc/site/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/favicon.ico -------------------------------------------------------------------------------- /doc/site/images/lws-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/lws-logo.png -------------------------------------------------------------------------------- /doc/site/images/plunker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/plunker.png -------------------------------------------------------------------------------- /doc/site/images/sx-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/sx-logo.png -------------------------------------------------------------------------------- /experiments/worker.js: -------------------------------------------------------------------------------- 1 | onmessage = function(e) { 2 | onmessage = new Function("e", e.data); 3 | }; -------------------------------------------------------------------------------- /doc/site/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/background.png -------------------------------------------------------------------------------- /doc/site/images/bottombar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/bottombar.png -------------------------------------------------------------------------------- /doc/site/images/empty-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/empty-logo.png -------------------------------------------------------------------------------- /doc/site/images/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/header-bg.png -------------------------------------------------------------------------------- /doc/site/images/khan-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/khan-logo.png -------------------------------------------------------------------------------- /doc/site/images/logo_half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/logo_half.png -------------------------------------------------------------------------------- /doc/site/images/pixie-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/pixie-logo.png -------------------------------------------------------------------------------- /doc/site/images/stypi-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/stypi-logo.png -------------------------------------------------------------------------------- /doc/site/images/textimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/textimage.png -------------------------------------------------------------------------------- /doc/site/images/zorba-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/zorba-logo.png -------------------------------------------------------------------------------- /lib/ace/css/expand-marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/lib/ace/css/expand-marker.png -------------------------------------------------------------------------------- /api/resources/images/Ace_ERD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/Ace_ERD.png -------------------------------------------------------------------------------- /api/resources/images/ace_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/ace_logo.png -------------------------------------------------------------------------------- /api/resources/images/main_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/main_bg.png -------------------------------------------------------------------------------- /doc/site/images/KERA-med-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/KERA-med-web.png -------------------------------------------------------------------------------- /doc/site/images/acebug-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/acebug-logo.png -------------------------------------------------------------------------------- /doc/site/images/cloud9-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/cloud9-logo.png -------------------------------------------------------------------------------- /doc/site/images/firefox-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/firefox-logo.png -------------------------------------------------------------------------------- /doc/site/images/github-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/github-logo.png -------------------------------------------------------------------------------- /doc/site/images/ideone-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/ideone-logo.png -------------------------------------------------------------------------------- /doc/site/images/modx-logo-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/modx-logo-4.png -------------------------------------------------------------------------------- /doc/site/images/repl.it-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/repl.it-logo.png -------------------------------------------------------------------------------- /doc/site/images/weecod-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/weecod-logo.png -------------------------------------------------------------------------------- /lib/ace/snippets/makefile.snippets: -------------------------------------------------------------------------------- 1 | snippet ifeq 2 | ifeq (${1:cond0},${2:cond1}) 3 | ${3:code} 4 | endif 5 | -------------------------------------------------------------------------------- /api/resources/images/c9-sponsor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/c9-sponsor.png -------------------------------------------------------------------------------- /api/resources/images/content_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/content_bg.png -------------------------------------------------------------------------------- /api/resources/images/footer-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/footer-bg.png -------------------------------------------------------------------------------- /api/resources/images/menu_disc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/menu_disc.png -------------------------------------------------------------------------------- /api/resources/images/method_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/method_bg.png -------------------------------------------------------------------------------- /demo/demo_helper.js: -------------------------------------------------------------------------------- 1 | ace.require("ace/lib/net").get(document.baseURI, function(t){ 2 | editor.setValue(t, 1); 3 | }) -------------------------------------------------------------------------------- /doc/site/images/body_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/body_background.png -------------------------------------------------------------------------------- /doc/site/images/codecademy-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/codecademy-logo.png -------------------------------------------------------------------------------- /doc/site/images/crunchapp-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/crunchapp-logo.png -------------------------------------------------------------------------------- /doc/site/images/fork_on_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/fork_on_github.png -------------------------------------------------------------------------------- /doc/site/images/rstudio_logo_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/rstudio_logo_64.png -------------------------------------------------------------------------------- /doc/site/images/shiftedit-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/shiftedit-logo.png -------------------------------------------------------------------------------- /doc/site/images/spandexio-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/spandexio-logo.png -------------------------------------------------------------------------------- /api/resources/images/ace_logo_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/ace_logo_menu.png -------------------------------------------------------------------------------- /api/resources/images/c9-log-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/c9-log-footer.png -------------------------------------------------------------------------------- /api/resources/images/cloud9-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/cloud9-logo.png -------------------------------------------------------------------------------- /api/resources/images/content-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/content-top.png -------------------------------------------------------------------------------- /api/resources/images/dashed_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/dashed_back.png -------------------------------------------------------------------------------- /api/resources/images/swirl_divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/swirl_divider.png -------------------------------------------------------------------------------- /demo/kitchen-sink/icons/error_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/demo/kitchen-sink/icons/error_obj.gif -------------------------------------------------------------------------------- /doc/site/images/FineCut_small_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/FineCut_small_logo.png -------------------------------------------------------------------------------- /doc/site/images/sassmeister-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/sassmeister-logo.png -------------------------------------------------------------------------------- /doc/site/images/wolf_3d_logo_trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/site/images/wolf_3d_logo_trans.png -------------------------------------------------------------------------------- /lib/ace/mode/_test/tokens_livescript.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["comment","# comment"] 4 | ],[ 5 | "start" 6 | ]] -------------------------------------------------------------------------------- /api/resources/images/content_top_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/content_top_bg.png -------------------------------------------------------------------------------- /api/resources/images/member-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/member-sprites.png -------------------------------------------------------------------------------- /api/resources/images/sidebar-top-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/sidebar-top-bg.png -------------------------------------------------------------------------------- /api/resources/images/sidebar_border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/sidebar_border.png -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/AsciiDoc.asciidoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/demo/kitchen-sink/docs/AsciiDoc.asciidoc -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/csharp.cs: -------------------------------------------------------------------------------- 1 | public void HelloWorld() { 2 | //Say Hello! 3 | Console.WriteLine("Hello World"); 4 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/icons/warning_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/demo/kitchen-sink/icons/warning_obj.gif -------------------------------------------------------------------------------- /doc/Contributor_License_Agreement-v2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/Contributor_License_Agreement-v2.pdf -------------------------------------------------------------------------------- /api/resources/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /api/resources/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /api/resources/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /doc/template/resources/images/Ace_ERD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/Ace_ERD.png -------------------------------------------------------------------------------- /doc/template/resources/images/ace_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/ace_logo.png -------------------------------------------------------------------------------- /doc/template/resources/images/footer-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/footer-bg.png -------------------------------------------------------------------------------- /doc/template/resources/images/main_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/main_bg.png -------------------------------------------------------------------------------- /doc/template/resources/images/menu_disc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/menu_disc.png -------------------------------------------------------------------------------- /doc/template/resources/images/method_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/method_bg.png -------------------------------------------------------------------------------- /doc/template/resources/images/c9-sponsor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/c9-sponsor.png -------------------------------------------------------------------------------- /doc/template/resources/images/cloud9-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/cloud9-logo.png -------------------------------------------------------------------------------- /doc/template/resources/images/content-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/content-top.png -------------------------------------------------------------------------------- /doc/template/resources/images/content_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/content_bg.png -------------------------------------------------------------------------------- /doc/template/resources/images/dashed_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/dashed_back.png -------------------------------------------------------------------------------- /api/resources/images/scrolled-heading-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/api/resources/images/scrolled-heading-shadow.png -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/coldfusion.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #welcome# -------------------------------------------------------------------------------- /doc/template/resources/images/ace_logo_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/ace_logo_menu.png -------------------------------------------------------------------------------- /doc/template/resources/images/c9-log-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/c9-log-footer.png -------------------------------------------------------------------------------- /doc/template/resources/images/content_top_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/content_top_bg.png -------------------------------------------------------------------------------- /doc/template/resources/images/member-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/member-sprites.png -------------------------------------------------------------------------------- /doc/template/resources/images/sidebar-top-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/sidebar-top-bg.png -------------------------------------------------------------------------------- /doc/template/resources/images/sidebar_border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/sidebar_border.png -------------------------------------------------------------------------------- /doc/template/resources/images/swirl_divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/swirl_divider.png -------------------------------------------------------------------------------- /lib/ace/css/codefolding-fold-button-states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/lib/ace/css/codefolding-fold-button-states.png -------------------------------------------------------------------------------- /version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var x; 3 | eval("x= " + require("fs").readFileSync(__dirname + "/package.json")) 4 | console.log(x.version) -------------------------------------------------------------------------------- /doc/Corporate_Contributor_License_Agreement-v2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/Corporate_Contributor_License_Agreement-v2.pdf -------------------------------------------------------------------------------- /lib/ace/mode/_test/text_html.txt: -------------------------------------------------------------------------------- 1 | 2 | '123' 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /demo/kitchen-sink/icons/Readme.txt: -------------------------------------------------------------------------------- 1 | The icons in this folder are from the Eclipse project and licensed under the Eclipse public license version 1.0 (EPL). -------------------------------------------------------------------------------- /doc/template/resources/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /doc/template/resources/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /doc/template/resources/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /doc/template/resources/images/scrolled-heading-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/ace/master/doc/template/resources/images/scrolled-heading-shadow.png -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/xquery.xq: -------------------------------------------------------------------------------- 1 | xquery version "1.0"; 2 | 3 | let $message := "Hello World!" 4 | return 5 | {$message} 6 | 7 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/javascript.js: -------------------------------------------------------------------------------- 1 | function foo(items, nada) { 2 | for (var i=0; i '2011-05-21' 5 | GROUP BY 1 6 | ORDER BY 2 DESC -------------------------------------------------------------------------------- /doc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ace-api", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "panino" : ">=2.2.0", 6 | "asset-smasher": "0.2.0" 7 | } 8 | } -------------------------------------------------------------------------------- /lib/ace/mode/_test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ace-mode-creator", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "connect": "", 6 | "socket.io": "" 7 | } 8 | } -------------------------------------------------------------------------------- /lib/ace/snippets/ledger.snippets: -------------------------------------------------------------------------------- 1 | # Ledger 2 | snippet ent 3 | `strftime("%Y/%m/%d")` ${1:transaction} 4 | ${2:account} ${3:value} 5 | ${4:account} 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "doc/wiki"] 2 | path = doc/wiki 3 | url = git://github.com/ajaxorg/ace.wiki.git 4 | [submodule "build"] 5 | path = build 6 | url = git://github.com/ajaxorg/ace-builds.git 7 | -------------------------------------------------------------------------------- /lib/ace/snippets/d.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./d.snippets"); 5 | exports.scope = "d"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/r.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./r.snippets"); 5 | exports.scope = "r"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/sh.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./sh.snippets"); 5 | exports.scope = "sh"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/abap.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./abap.snippets"); 5 | exports.scope = "abap"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/ada.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ada.snippets"); 5 | exports.scope = "ada"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/css.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./css.snippets"); 5 | exports.scope = "css"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/dart.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./dart.snippets"); 5 | exports.scope = "dart"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/diff.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./diff.snippets"); 5 | exports.scope = "diff"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/dot.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./dot.snippets"); 5 | exports.scope = "dot"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/ejs.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ejs.snippets"); 5 | exports.scope = "ejs"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/ftl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ftl.snippets"); 5 | exports.scope = "ftl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/glsl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./glsl.snippets"); 5 | exports.scope = "glsl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/haml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./haml.snippets"); 5 | exports.scope = "haml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/haxe.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./haxe.snippets"); 5 | exports.scope = "haxe"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/html.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./html.snippets"); 5 | exports.scope = "html"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/ini.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ini.snippets"); 5 | exports.scope = "ini"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/jade.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jade.snippets"); 5 | exports.scope = "jade"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/java.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./java.snippets"); 5 | exports.scope = "java"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/json.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./json.snippets"); 5 | exports.scope = "json"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/jsp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jsp.snippets"); 5 | exports.scope = "jsp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/jsx.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jsx.snippets"); 5 | exports.scope = "jsx"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/less.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./less.snippets"); 5 | exports.scope = "less"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/lisp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lisp.snippets"); 5 | exports.scope = "lisp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/lsl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lsl.snippets"); 5 | exports.scope = "lsl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/lua.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lua.snippets"); 5 | exports.scope = "lua"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/perl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./perl.snippets"); 5 | exports.scope = "perl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/php.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./php.snippets"); 5 | exports.scope = "php"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/rdoc.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./rdoc.snippets"); 5 | exports.scope = "rdoc"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/ruby.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ruby.snippets"); 5 | exports.scope = "ruby"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/rust.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./rust.snippets"); 5 | exports.scope = "rust"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/sass.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./sass.snippets"); 5 | exports.scope = "sass"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/scad.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scad.snippets"); 5 | exports.scope = "scad"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/scss.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scss.snippets"); 5 | exports.scope = "scss"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/sql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./sql.snippets"); 5 | exports.scope = "sql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/svg.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./svg.snippets"); 5 | exports.scope = "svg"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/tcl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./tcl.snippets"); 5 | exports.scope = "tcl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/tex.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./tex.snippets"); 5 | exports.scope = "tex"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./text.snippets"); 5 | exports.scope = "text"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/toml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./toml.snippets"); 5 | exports.scope = "toml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/twig.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./twig.snippets"); 5 | exports.scope = "twig"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/xml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./xml.snippets"); 5 | exports.scope = "xml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./yaml.snippets"); 5 | exports.scope = "yaml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/jsx.jsx: -------------------------------------------------------------------------------- 1 | /*EXPECTED 2 | hello world! 3 | */ 4 | class Test { 5 | static function run() : void { 6 | // console.log("hello world!"); 7 | log "hello world!"; 8 | } 9 | } -------------------------------------------------------------------------------- /lib/ace/snippets/c_cpp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./c_cpp.snippets"); 5 | exports.scope = "c_cpp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/cobol.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./cobol.snippets"); 5 | exports.scope = "cobol"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/curly.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./curly.snippets"); 5 | exports.scope = "curly"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/forth.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./forth.snippets"); 5 | exports.scope = "forth"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/julia.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./julia.snippets"); 5 | exports.scope = "julia"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/latex.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./latex.snippets"); 5 | exports.scope = "latex"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/mysql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./mysql.snippets"); 5 | exports.scope = "mysql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/ocaml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ocaml.snippets"); 5 | exports.scope = "ocaml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/pgsql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./pgsql.snippets"); 5 | exports.scope = "pgsql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/rhtml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./rhtml.snippets"); 5 | exports.scope = "rhtml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/scala.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scala.snippets"); 5 | exports.scope = "scala"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/clojure.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./clojure.snippets"); 5 | exports.scope = "clojure"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/coffee.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./coffee.snippets"); 5 | exports.scope = "coffee"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/csharp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./csharp.snippets"); 5 | exports.scope = "csharp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/django.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./django.snippets"); 5 | exports.scope = "django"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/erlang.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./erlang.snippets"); 5 | exports.scope = "erlang"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/golang.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./golang.snippets"); 5 | exports.scope = "golang"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/groovy.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./groovy.snippets"); 5 | exports.scope = "groovy"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/haskell.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./haskell.snippets"); 5 | exports.scope = "haskell"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/jsoniq.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jsoniq.snippets"); 5 | exports.scope = "jsoniq"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/liquid.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./liquid.snippets"); 5 | exports.scope = "liquid"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/logiql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./logiql.snippets"); 5 | exports.scope = "logiql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/luapage.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./luapage.snippets"); 5 | exports.scope = "luapage"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/lucene.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lucene.snippets"); 5 | exports.scope = "lucene"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/matlab.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./matlab.snippets"); 5 | exports.scope = "matlab"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/pascal.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./pascal.snippets"); 5 | exports.scope = "pascal"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/prolog.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./prolog.snippets"); 5 | exports.scope = "prolog"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/python.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./python.snippets"); 5 | exports.scope = "python"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/scheme.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scheme.snippets"); 5 | exports.scope = "scheme"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/stylus.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./stylus.snippets"); 5 | exports.scope = "stylus"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/textile.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./textile.snippets"); 5 | exports.scope = "textile"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/verilog.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./verilog.snippets"); 5 | exports.scope = "verilog"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/xquery.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./xquery.snippets"); 5 | exports.scope = "xquery"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /tool/snippets.tmpl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./%modeName%.snippets"); 5 | exports.scope = "%modeName%"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/text_xml.txt: -------------------------------------------------------------------------------- 1 | //Juhu Kinners 2 | test: two tags in the same lines should be in separate tokens" 3 | 4 | test: multiline attributes" 5 | -------------------------------------------------------------------------------- /lib/ace/snippets/asciidoc.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./asciidoc.snippets"); 5 | exports.scope = "asciidoc"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/batchfile.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./batchfile.snippets"); 5 | exports.scope = "batchfile"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/c9search.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./c9search.snippets"); 5 | exports.scope = "c9search"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/html_ruby.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./html_ruby.snippets"); 5 | exports.scope = "html_ruby"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/makefile.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./makefile.snippets"); 5 | exports.scope = "makefile"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/markdown.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./markdown.snippets"); 5 | exports.scope = "markdown"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/mushcode.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./mushcode.snippets"); 5 | exports.scope = "mushcode"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/snippets.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./snippets.snippets"); 5 | exports.scope = "snippets"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/vbscript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./vbscript.snippets"); 5 | exports.scope = "vbscript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/velocity.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./velocity.snippets"); 5 | exports.scope = "velocity"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/autohotkey.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./autohotkey.snippets"); 5 | exports.scope = "autohotkey"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/coldfusion.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./coldfusion.snippets"); 5 | exports.scope = "coldfusion"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/javascript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./javascript.snippets"); 5 | exports.scope = "javascript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/livescript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./livescript.snippets"); 5 | exports.scope = "livescript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/objectivec.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./objectivec.snippets"); 5 | exports.scope = "objectivec"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/powershell.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./powershell.snippets"); 5 | exports.scope = "powershell"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/properties.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./properties.snippets"); 5 | exports.scope = "properties"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/typescript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./typescript.snippets"); 5 | exports.scope = "typescript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /tool/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ace-tools", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "plist": "", 6 | "css-parse": "1.0.3", 7 | "css-stringify": "1.0.3" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/ace/snippets/actionscript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./actionscript.snippets"); 5 | exports.scope = "actionscript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/assembly_x86.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./assembly_x86.snippets"); 5 | exports.scope = "assembly_x86"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /lib/ace/snippets/snippets.snippets: -------------------------------------------------------------------------------- 1 | # snippets for making snippets :) 2 | snippet snip 3 | snippet ${1:trigger} 4 | ${2} 5 | snippet msnip 6 | snippet ${1:trigger} ${2:description} 7 | ${3} 8 | snippet v 9 | {VISUAL} 10 | -------------------------------------------------------------------------------- /lib/ace/snippets/mushcode_high_rules.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./mushcode_high_rules.snippets"); 5 | exports.scope = "mushcode_high_rules"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /doc/template/jade/layout.jade: -------------------------------------------------------------------------------- 1 | include common_layout 2 | include lib 3 | 4 | #documentation.span9 5 | -if (isIndex) 6 | != indexContent 7 | -else 8 | mixin api() 9 | 10 | mixin endingScripts 11 | 12 | div(id="disqus_thread") -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/julia.jl: -------------------------------------------------------------------------------- 1 | for op = (:+, :*, :&, :|, :$) 2 | @eval ($op)(a,b,c) = ($op)(($op)(a,b),c) 3 | end 4 | 5 | 6 | function g(x,y) 7 | return x * y 8 | x + y 9 | end 10 | 11 | cd("data") do 12 | open("outfile", "w") do f 13 | write(f, data) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/twig.twig: -------------------------------------------------------------------------------- 1 | {% autoescape true %} 2 | {{ var }} 3 | {{ var|raw }} {# var won't be escaped #} 4 | {{ var|escape }} {# var won't be doubled-escaped #} 5 | {% endautoescape %} 6 | 7 | {{ include('twig.html', sandboxed = true) }} 8 | 9 | {{"string #{with} \" escapes" 'another#one' }} -------------------------------------------------------------------------------- /lib/ace/mode/_test/text_curly.txt: -------------------------------------------------------------------------------- 1 | tokenize Curly template{{test}} 2 | tokenize embedded script 3 | '123' 4 | tokenize multiline attribute value with double quotes 5 | 7 | tokenize multiline attribute value with single quotes 8 | 10 | -------------------------------------------------------------------------------- /lib/ace/mode/xquery/Readme.md: -------------------------------------------------------------------------------- 1 | WARNING! 2 | ============================ 3 | 4 | Files in this folder are generated automatically from the xquery.js project (https://github.com/wcandillon/xquery.js). 5 | Instructions on how to generate the XQuery parser are available at https://github.com/wcandillon/xquery.js 6 | 7 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/Readme.md: -------------------------------------------------------------------------------- 1 | `tokens_.json` files keep information about correct tokens and tokenizer states for all modes supported by ace. 2 | They are generated from `text_.txt` or `demo/kitchen-sink/doc/*` with 3 | 4 | ```sh 5 | node highlight_rules_test.js -gen 6 | ``` 7 | 8 | command. 9 | 10 | -------------------------------------------------------------------------------- /lib/ace/test/asyncjs/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * async.js 3 | * Copyright(c) 2010 Fabian Jakobs 4 | * MIT Licensed 5 | */ 6 | 7 | define(function(require, exports, module) { 8 | 9 | module.exports = require("./async") 10 | module.exports.test = require("./test") 11 | require("./utils") 12 | 13 | }) 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Junk that could exist anywhere: 2 | .DS_Store 3 | *.swp 4 | *.tmp 5 | 6 | # Project files that should not be in the repo 7 | .* 8 | !/.gitignore 9 | .*.gz 10 | *.tmTheme.js 11 | 12 | # A handy place to put stuff that git should ignore: 13 | /ignore/ 14 | node_modules/ 15 | jam/ 16 | * * 17 | 18 | .git-ref 19 | npm-debug.log 20 | deps/ 21 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/batchfile.bat: -------------------------------------------------------------------------------- 1 | :: batch file highlighting in Ace! 2 | @echo off 3 | 4 | CALL set var1=%cd% 5 | echo unhide everything in %var1%! 6 | 7 | :: FOR loop in bat is super strange! 8 | FOR /f "tokens=*" %%G IN ('dir /A:D /b') DO ( 9 | echo %var1%%%G 10 | attrib -r -a -h -s "%var1%%%G" /D /S 11 | ) 12 | 13 | pause 14 | 15 | REM that's all 16 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 |

Juhu Kinners

15 | 16 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/curly.curly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 |

{{author_name}}

15 | 16 | 17 | -------------------------------------------------------------------------------- /doc/site/iphone.css: -------------------------------------------------------------------------------- 1 | #wrapper { 2 | position:relative; 3 | overflow:hidden; 4 | } 5 | 6 | #wrapper .content .column1 { 7 | margin:0 16px 0 15px; 8 | } 9 | 10 | #header .content .signature { 11 | font-size:18px; 12 | bottom:0; 13 | } 14 | 15 | UL.menu-list LI { 16 | font-size:22px; 17 | } 18 | 19 | UL.menu-footer LI { 20 | font-size:22px; 21 | } 22 | 23 | PRE{ 24 | font-size:22px; 25 | } -------------------------------------------------------------------------------- /lib/ace/snippets/haml.snippets: -------------------------------------------------------------------------------- 1 | snippet t 2 | %table 3 | %tr 4 | %th 5 | ${1:headers} 6 | %tr 7 | %td 8 | ${2:headers} 9 | snippet ul 10 | %ul 11 | %li 12 | ${1:item} 13 | %li 14 | snippet =rp 15 | = render :partial => '${1:partial}' 16 | snippet =rpl 17 | = render :partial => '${1:partial}', :locals => {} 18 | snippet =rpc 19 | = render :partial => '${1:partial}', :collection => @$1 20 | 21 | -------------------------------------------------------------------------------- /lib/ace/snippets/rst.snippets: -------------------------------------------------------------------------------- 1 | # rst 2 | 3 | snippet : 4 | :${1:field name}: ${2:field body} 5 | snippet * 6 | *${1:Emphasis}* 7 | snippet ** 8 | **${1:Strong emphasis}** 9 | snippet _ 10 | \`${1:hyperlink-name}\`_ 11 | .. _\`$1\`: ${2:link-block} 12 | snippet = 13 | ${1:Title} 14 | =====${2:=} 15 | ${3} 16 | snippet - 17 | ${1:Title} 18 | -----${2:-} 19 | ${3} 20 | snippet cont: 21 | .. contents:: 22 | 23 | -------------------------------------------------------------------------------- /lib/ace/test/mockdom.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var dom = require('jsdom/lib/jsdom/level2/html').dom.level2.html; 4 | var browser = require('jsdom/lib/jsdom/browser/index').windowAugmentation(dom); 5 | 6 | global.document = browser.document; 7 | global.window = browser.window; 8 | global.self = browser.self; 9 | global.navigator = browser.navigator; 10 | global.location = browser.location; 11 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/OpenSCAD.scad: -------------------------------------------------------------------------------- 1 | // ace can highlight scad! 2 | module Element(xpos, ypos, zpos){ 3 | translate([xpos,ypos,zpos]){ 4 | union(){ 5 | cube([10,10,4],true); 6 | cylinder(10,15,5); 7 | translate([0,0,10])sphere(5); 8 | } 9 | } 10 | } 11 | 12 | union(){ 13 | for(i=[0:30]){ 14 | # Element(0,0,0); 15 | Element(15*i,0,0); 16 | } 17 | } 18 | 19 | for (i = [3, 5, 7, 11]){ 20 | rotate([i*10,0,0])scale([1,1,i])cube(10); 21 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/php.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/site/js/ga.js: -------------------------------------------------------------------------------- 1 | var _gaq = _gaq || []; 2 | _gaq.push(['_setAccount', 'UA-31998201-1']); 3 | _gaq.push(['_trackPageview']); 4 | 5 | (function() { 6 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 7 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 8 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 9 | })(); -------------------------------------------------------------------------------- /doc/index.md: -------------------------------------------------------------------------------- 1 | # Ace API Reference 2 | 3 | Welcome to the Ace API Reference Guide. Ace is a standalone code editor written in JavaScript that you can embed onto any website. We're used in a bunch of places already, like GitHub, Google, and Facebook. 4 | 5 | On the left, you'll find a list of all of our currently documented classes. There are plenty more to do, but these represent the "core" set. For more information on how to work with Ace, check out the [main Ace website](http://ace.ajax.org). -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/java.java: -------------------------------------------------------------------------------- 1 | public class InfiniteLoop { 2 | 3 | /* 4 | * This will cause the program to hang... 5 | * 6 | * Taken from: 7 | * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/ 8 | */ 9 | public static void main(String[] args) { 10 | double d = Double.parseDouble("2.2250738585072012e-308"); 11 | 12 | // unreachable code 13 | System.out.println("Value: " + d); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/ace/snippets/diff.snippets: -------------------------------------------------------------------------------- 1 | # DEP-3 (http://dep.debian.net/deps/dep3/) style patch header 2 | snippet header DEP-3 style header 3 | Description: ${1} 4 | Origin: ${2:vendor|upstream|other}, ${3:url of the original patch} 5 | Bug: ${4:url in upstream bugtracker} 6 | Forwarded: ${5:no|not-needed|url} 7 | Author: ${6:`g:snips_author`} 8 | Reviewed-by: ${7:name and email} 9 | Last-Update: ${8:`strftime("%Y-%m-%d")`} 10 | Applied-Upstream: ${9:upstream version|url|commit} 11 | 12 | -------------------------------------------------------------------------------- /lib/ace/snippets/lua.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env lua 3 | $1 4 | snippet local 5 | local ${1:x} = ${2:1} 6 | snippet fun 7 | function ${1:fname}(${2:...}) 8 | ${3:-- body} 9 | end 10 | snippet for 11 | for ${1:i}=${2:1},${3:10} do 12 | ${4:print(i)} 13 | end 14 | snippet forp 15 | for ${1:i},${2:v} in pairs(${3:table_name}) do 16 | ${4:-- body} 17 | end 18 | snippet fori 19 | for ${1:i},${2:v} in ipairs(${3:table_name}) do 20 | ${4:-- body} 21 | end 22 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/logiql.logic: -------------------------------------------------------------------------------- 1 | // ancestors 2 | parentof("douglas", "john"). 3 | parentof("john", "bob"). 4 | parentof("bob", "ebbon"). 5 | 6 | parentof("douglas", "jane"). 7 | parentof("jane", "jan"). 8 | 9 | ancestorof(A, B) <- parentof(A, B). 10 | ancestorof(A, C) <- ancestorof(A, B), parentof(B,C). 11 | 12 | grandparentof(A, B) <- parentof(A, C), parentof(C, B). 13 | 14 | cousins(A,B) <- grandparentof(C,A), grandparentof(C,B). 15 | 16 | parentof[`arg](A, B) -> int[32](A), !string(B). -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/scss.scss: -------------------------------------------------------------------------------- 1 | /* style.scss */ 2 | 3 | #navbar { 4 | $navbar-width: 800px; 5 | $items: 5; 6 | $navbar-color: #ce4dd6; 7 | 8 | width: $navbar-width; 9 | border-bottom: 2px solid $navbar-color; 10 | 11 | li { 12 | float: left; 13 | width: $navbar-width/$items - 10px; 14 | 15 | background-color: lighten($navbar-color, 20%); 16 | &:hover { 17 | background-color: lighten($navbar-color, 10%); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The API doc build takes a look a source Javascript files in the _lib_ directory, and turns it into HTML output in the _api_ directory. It uses [Panino](https://github.com/gjtorikian/panino-docs) to perform the conversion. 4 | 5 | For any questions on the build system, please see that repo. 6 | 7 | # Building 8 | 9 | In the root directory, just run: 10 | 11 | make doc 12 | 13 | In this directory, just run: 14 | 15 | npm install 16 | node build.js 17 | 18 | -------------------------------------------------------------------------------- /lib/ace/mode/lucene.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | 'use strict'; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; 8 | 9 | var Mode = function() { 10 | this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules()); 11 | }; 12 | 13 | oop.inherits(Mode, TextMode); 14 | 15 | exports.Mode = Mode; 16 | }); -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/coffeescript.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env coffee 2 | 3 | try 4 | throw URIError decodeURI(0xC0ffee * 123456.7e-8 / .9) 5 | catch e 6 | console.log 'qstring' + "qqstring" + ''' 7 | qdoc 8 | ''' + """ 9 | qqdoc 10 | """ 11 | 12 | do -> 13 | ### 14 | herecomment 15 | ### 16 | re = /regex/imgy.test /// 17 | heregex # comment 18 | ///imgy 19 | this isnt: `just JavaScript` 20 | undefined 21 | 22 | sentence = "#{ 22 / 7 } is a decent approximation of π" -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/Haxe.hx: -------------------------------------------------------------------------------- 1 | class Haxe 2 | { 3 | public static function main() 4 | { 5 | // Say Hello! 6 | var greeting:String = "Hello World"; 7 | trace(greeting); 8 | 9 | var targets:Array = ["Flash","Javascript","PHP","Neko","C++","iOS","Android","webOS"]; 10 | trace("Haxe is a great language that can target:"); 11 | for (target in targets) 12 | { 13 | trace (" - " + target); 14 | } 15 | trace("And many more!"); 16 | } 17 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/textile.textile: -------------------------------------------------------------------------------- 1 | h1. Textile document 2 | 3 | h2. Heading Two 4 | 5 | h3. A two-line 6 | header 7 | 8 | h2. Another two-line 9 | header 10 | 11 | Paragraph: 12 | one, two, 13 | thee lines! 14 | 15 | p(classone two three). This is a paragraph with classes 16 | 17 | p(#id). (one with an id) 18 | 19 | p(one two three#my_id). ..classes + id 20 | 21 | * Unordered list 22 | ** sublist 23 | * back again! 24 | ** sublist again.. 25 | 26 | # ordered 27 | 28 | bg. Blockquote! 29 | This is a two-list blockquote..! -------------------------------------------------------------------------------- /lib/ace/ext/static.css: -------------------------------------------------------------------------------- 1 | .ace_editor { 2 | font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace; 3 | font-size: 12px; 4 | } 5 | 6 | .ace_editor .ace_gutter { 7 | width: 25px !important; 8 | display: block; 9 | float: left; 10 | text-align: right; 11 | padding: 0 3px 0 0; 12 | margin-right: 3px; 13 | } 14 | 15 | .ace_line { clear: both; } 16 | 17 | *.ace_gutter-cell { 18 | -moz-user-select: -moz-none; 19 | -khtml-user-select: none; 20 | -webkit-user-select: none; 21 | user-select: none; 22 | } -------------------------------------------------------------------------------- /lib/ace/snippets/textile.snippets: -------------------------------------------------------------------------------- 1 | # Jekyll post header 2 | snippet header 3 | --- 4 | title: ${1:title} 5 | layout: post 6 | date: ${2:date} ${3:hour:minute:second} -05:00 7 | --- 8 | 9 | # Image 10 | snippet img 11 | !${1:url}(${2:title}):${3:link}! 12 | 13 | # Table 14 | snippet | 15 | |${1}|${2} 16 | 17 | # Link 18 | snippet link 19 | "${1:link text}":${2:url} 20 | 21 | # Acronym 22 | snippet ( 23 | (${1:Expand acronym})${2} 24 | 25 | # Footnote 26 | snippet fn 27 | [${1:ref number}] ${3} 28 | 29 | fn$1. ${2:footnote} 30 | 31 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/powershell.ps1: -------------------------------------------------------------------------------- 1 | # This is a simple comment 2 | function Hello($name) { 3 | Write-host "Hello $name" 4 | } 5 | 6 | function add($left, $right=4) { 7 | if ($right -ne 4) { 8 | return $left 9 | } elseif ($left -eq $null -and $right -eq 2) { 10 | return 3 11 | } else { 12 | return 2 13 | } 14 | } 15 | 16 | $number = 1 + 2; 17 | $number += 3 18 | 19 | Write-Host Hello -name "World" 20 | 21 | $an_array = @(1, 2, 3) 22 | $a_hash = @{"something" = "something else"} 23 | 24 | & notepad .\readme.md 25 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/text_markdown.txt: -------------------------------------------------------------------------------- 1 | test: header 1 2 | #f 3 | test: header 2 4 | ## foo 5 | test: header ends with ' #' 6 | # # # 7 | test: header ends with '#' 8 | #foo# 9 | test: 6+ #s is not a valid header 10 | ####### foo 11 | test: # followed be only space is not a valid header 12 | # 13 | test: only space between #s is not a valid header 14 | # # 15 | 16 | # test links [Cloud9 IDE](http://www.c9.io/) # 17 | * [demo](http://ajaxorg.github.com/ace/) 18 | * usually *work* fine (_em_) 19 | in lists 20 | 21 | in plain text http://ace.ajaxorg.com 22 | 23 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/snippets.snippets: -------------------------------------------------------------------------------- 1 | # Function 2 | snippet fun 3 | function ${1?:function_name}(${2:argument}) { 4 | ${3:// body...} 5 | } 6 | # Anonymous Function 7 | regex /((=)\s*|(:)\s*|(\()|\b)/f/(\))?/ 8 | name f 9 | function${M1?: ${1:functionName}}($2) { 10 | ${0:$TM_SELECTED_TEXT} 11 | }${M2?;}${M3?,}${M4?)} 12 | # Immediate function 13 | trigger \(?f\( 14 | endTrigger \)? 15 | snippet f( 16 | (function(${1}) { 17 | ${0:${TM_SELECTED_TEXT:/* code */}} 18 | }(${1})); 19 | # if 20 | snippet if 21 | if (${1:true}) { 22 | ${0} 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/tex.tex: -------------------------------------------------------------------------------- 1 | The quadratic formula is $$-b \pm \sqrt{b^2 - 4ac} \over 2a$$ 2 | \bye 3 | 4 | \makeatletter 5 | \newcommand{\be}{% 6 | \begingroup 7 | % \setlength{\arraycolsep}{2pt} 8 | \eqnarray% 9 | \@ifstar{\nonumber}{}% 10 | } 11 | \newcommand{\ee}{\endeqnarray\endgroup} 12 | \makeatother 13 | 14 | \begin{equation} 15 | x=\left\{ \begin{array}{cl} 16 | 0 & \textrm{if }A=\ldots\\ 17 | 1 & \textrm{if }B=\ldots\\ 18 | x & \textrm{this runs with as much text as you like, but without an raggeright text 19 | .}\end{array}\right. 20 | \end{equation} -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/python.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | 3 | import string, sys 4 | 5 | # If no arguments were given, print a helpful message 6 | if len(sys.argv)==1: 7 | print '''Usage: 8 | celsius temp1 temp2 ...''' 9 | sys.exit(0) 10 | 11 | # Loop over the arguments 12 | for i in sys.argv[1:]: 13 | try: 14 | fahrenheit=float(string.atoi(i)) 15 | except string.atoi_error: 16 | print repr(i), "not a numeric value" 17 | else: 18 | celsius=(fahrenheit-32)*5.0/9.0 19 | print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5)) -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/erlang.erl: -------------------------------------------------------------------------------- 1 | %% A process whose only job is to keep a counter. 2 | %% First version 3 | -module(counter). 4 | -export([start/0, codeswitch/1]). 5 | 6 | start() -> loop(0). 7 | 8 | loop(Sum) -> 9 | receive 10 | {increment, Count} -> 11 | loop(Sum+Count); 12 | {counter, Pid} -> 13 | Pid ! {counter, Sum}, 14 | loop(Sum); 15 | code_switch -> 16 | ?MODULE:codeswitch(Sum) 17 | % Force the use of 'codeswitch/1' from the latest MODULE version 18 | end. 19 | 20 | codeswitch(Sum) -> loop(Sum). -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/prolog.plg: -------------------------------------------------------------------------------- 1 | partition([], _, [], []). 2 | partition([X|Xs], Pivot, Smalls, Bigs) :- 3 | ( X @< Pivot -> 4 | Smalls = [X|Rest], 5 | partition(Xs, Pivot, Rest, Bigs) 6 | ; Bigs = [X|Rest], 7 | partition(Xs, Pivot, Smalls, Rest) 8 | ). 9 | 10 | quicksort([]) --> []. 11 | quicksort([X|Xs]) --> 12 | { partition(Xs, X, Smaller, Bigger) }, 13 | quicksort(Smaller), [X], quicksort(Bigger). 14 | 15 | perfect(N) :- 16 | between(1, inf, N), U is N // 2, 17 | findall(D, (between(1,U,D), N mod D =:= 0), Ds), 18 | sumlist(Ds, N). -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/css.css: -------------------------------------------------------------------------------- 1 | .text-layer { 2 | font-family: Monaco, "Courier New", monospace; 3 | font-size: 12pX; 4 | cursor: text; 5 | } 6 | 7 | .blinker { 8 | animation-duration: 1s; 9 | animation-name: blink; 10 | animation-iteration-count: infinite; 11 | animation-direction: alternate; 12 | animation-timing-function: linear; 13 | } 14 | 15 | @keyframes blink { 16 | 0% { 17 | opacity: 0; 18 | } 19 | 40% { 20 | opacity: 0; 21 | } 22 | 40.5% { 23 | opacity: 1 24 | } 25 | 100% { 26 | opacity: 1 27 | } 28 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/rhtml.Rhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Title 5 | 6 | 7 | 8 | 9 |

This is an R HTML document. When you click the Knit HTML button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

10 | 11 | 14 | 15 |

You can also embed plots, for example:

16 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/rust.rs: -------------------------------------------------------------------------------- 1 | use core::rand::RngUtil; 2 | 3 | fn main() { 4 | for ["Alice", "Bob", "Carol"].each |&name| { 5 | do spawn { 6 | let v = rand::Rng().shuffle([1, 2, 3]); 7 | for v.each |&num| { 8 | print(fmt!("%s says: '%d'\n", name, num + 1)) 9 | } 10 | } 11 | } 12 | } 13 | 14 | fn map(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] { 15 | let mut accumulator = ~[]; 16 | for vec::each(vector) |element| { 17 | accumulator.push(function(element)); 18 | } 19 | return accumulator; 20 | } 21 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/assembly_x86.asm: -------------------------------------------------------------------------------- 1 | section .text 2 | global main ;must be declared for using gcc 3 | 4 | main: ;tell linker entry point 5 | 6 | mov edx, len ;message length 7 | mov ecx, msg ;message to write 8 | mov ebx, 1 ;file descriptor (stdout) 9 | mov eax, 4 ;system call number (sys_write) 10 | int 0x80 ;call kernel 11 | 12 | mov eax, 1 ;system call number (sys_exit) 13 | int 0x80 ;call kernel 14 | 15 | section .data 16 | 17 | msg db 'Hello, world!',0xa ;our dear string 18 | len equ $ - msg ;length of our dear string 19 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/glsl.glsl: -------------------------------------------------------------------------------- 1 | uniform float amplitude; 2 | attribute float displacement; 3 | varying vec3 vNormal; 4 | 5 | void main() { 6 | 7 | vNormal = normal; 8 | 9 | // multiply our displacement by the 10 | // amplitude. The amp will get animated 11 | // so we'll have animated displacement 12 | vec3 newPosition = position + 13 | normal * 14 | vec3(displacement * 15 | amplitude); 16 | 17 | gl_Position = projectionMatrix * 18 | modelViewMatrix * 19 | vec4(newPosition,1.0); 20 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/haskell.hs: -------------------------------------------------------------------------------- 1 | -- Type annotation (optional) 2 | fib :: Int -> Integer 3 | 4 | -- With self-referencing data 5 | fib n = fibs !! n 6 | where fibs = 0 : scanl (+) 1 fibs 7 | -- 0,1,1,2,3,5,... 8 | 9 | -- Same, coded directly 10 | fib n = fibs !! n 11 | where fibs = 0 : 1 : next fibs 12 | next (a : t@(b:_)) = (a+b) : next t 13 | 14 | -- Similar idea, using zipWith 15 | fib n = fibs !! n 16 | where fibs = 0 : 1 : zipWith (+) fibs (tail fibs) 17 | 18 | -- Using a generator function 19 | fib n = fibs (0,1) !! n 20 | where fibs (a,b) = a : fibs (b,a+b) -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/html_ruby.erb: -------------------------------------------------------------------------------- 1 |

Listing Books

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <% @books.each do |book| %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | <% end %> 21 |
TitleSummary
<%= book.title %><%= book.content %><%= link_to 'Show', book %><%= link_to 'Edit', edit_book_path(book) %><%= link_to 'Remove', book, :confirm => 'Are you sure?', :method => :delete %>
22 | 23 |
24 | 25 | <%= link_to 'New book', new_book_path %> -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/ocaml.ml: -------------------------------------------------------------------------------- 1 | (* 2 | * Example of early return implementation taken from 3 | * http://ocaml.janestreet.com/?q=node/91 4 | *) 5 | 6 | let with_return (type t) (f : _ -> t) = 7 | let module M = 8 | struct exception Return of t end 9 | in 10 | let return = { return = (fun x -> raise (M.Return x)); } in 11 | try f return with M.Return x -> x 12 | 13 | 14 | (* Function that uses the 'early return' functionality provided by `with_return` *) 15 | let sum_until_first_negative list = 16 | with_return (fun r -> 17 | List.fold list ~init:0 ~f:(fun acc x -> 18 | if x >= 0 then acc + x else r.return acc)) -------------------------------------------------------------------------------- /lib/ace/mode/_test/tokens_coldfusion.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["comment",""] 4 | ],[ 5 | "start" 6 | ],[ 7 | "start", 8 | ["meta.tag","<"], 9 | ["meta.tag.tag-name","cfset"], 10 | ["text"," "], 11 | ["entity.other.attribute-name","welcome"], 12 | ["keyword.operator","="], 13 | ["string","\"Hello World!\""], 14 | ["meta.tag.r",">"] 15 | ],[ 16 | "start" 17 | ],[ 18 | "start", 19 | ["meta.tag","<"], 20 | ["meta.tag.tag-name","cfoutput"], 21 | ["meta.tag.r",">"], 22 | ["text","#welcome#"], 23 | ["meta.tag",""] 26 | ]] -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/scheme.scm: -------------------------------------------------------------------------------- 1 | (define (prompt-for-cd) 2 | "Prompts 3 | for CD" 4 | (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6)) 5 | (prompt-read "Artist") 6 | (or (parse-integer (prompt-read "Rating") #:junk-allowed #t) 0) 7 | (if x (format #t "yes") (format #f "no") ;and here comment 8 | ) 9 | ;; second line comment 10 | '(+ 1 2) 11 | (position-if-not char-set:whitespace line #:start beg)) 12 | (quote (privet 1 2 3)) 13 | '(hello world) 14 | (* 5 7) 15 | (1 2 34 5) 16 | (#:use "aaaa") 17 | (let ((x 10) (y 20)) 18 | (display (+ x y)) 19 | ) 20 | 21 | "asdad\0eqweqe" 22 | -------------------------------------------------------------------------------- /tool/tmthemes/LICENSE: -------------------------------------------------------------------------------- 1 | If not otherwise specified (see below), files in this directory fall under the following license: 2 | 3 | Permission to copy, use, modify, sell and distribute this 4 | software is granted. This software is provided "as is" without 5 | express or implied warranty, and with no claim as to its 6 | suitability for any purpose. 7 | 8 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/properties.properties: -------------------------------------------------------------------------------- 1 | # You are reading the ".properties" entry. 2 | ! The exclamation mark can also mark text as comments. 3 | # The key and element characters #, !, =, and : are written with a preceding backslash to ensure that they are properly loaded. 4 | website = http\://en.wikipedia.org/ 5 | language = English 6 | # The backslash below tells the application to continue reading 7 | # the value onto the next line. 8 | message = Welcome to \ 9 | Wikipedia! 10 | # Add spaces to the key 11 | key\ with\ spaces = This is the value that could be looked up with the key "key with spaces". 12 | # Unicode 13 | tab : \u0009 14 | empty-key= 15 | last.line=value 16 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/less.less: -------------------------------------------------------------------------------- 1 | /* styles.less */ 2 | 3 | @base: #f938ab; 4 | 5 | .box-shadow(@style, @c) when (iscolor(@c)) { 6 | box-shadow: @style @c; 7 | -webkit-box-shadow: @style @c; 8 | -moz-box-shadow: @style @c; 9 | } 10 | .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { 11 | .box-shadow(@style, rgba(0, 0, 0, @alpha)); 12 | } 13 | 14 | // Box styles 15 | .box { 16 | color: saturate(@base, 5%); 17 | border-color: lighten(@base, 30%); 18 | 19 | div { .box-shadow(0 0 5px, 30%) } 20 | 21 | a { 22 | color: @base; 23 | 24 | &:hover { 25 | color: lighten(@base, 50%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/ruby.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | # Program to find the factorial of a number 4 | def fact(n) 5 | if n == 0 6 | 1 7 | else 8 | n * fact(n-1) 9 | end 10 | end 11 | 12 | puts fact(ARGV[0].to_i) 13 | 14 | class Range 15 | def to_json(*a) 16 | { 17 | 'json_class' => self.class.name, # = 'Range' 18 | 'data' => [ first, last, exclude_end? ] 19 | }.to_json(*a) 20 | end 21 | end 22 | 23 | {:id => 34, :key => "value"} 24 | 25 | 26 | herDocs = [<<'FOO', <
 
 2 | // elements on the page and add the "prettyprint" style. If at least one 
 3 | // prettyprint element was found, call the Google Prettify prettyPrint() API.
 4 | //http://sstatic.net/so/js/master.js?v=6523
 5 | function styleCode() 
 6 | {
 7 |     if (typeof disableStyleCode != "undefined") 
 8 |     {
 9 |         return;
10 |     }
11 | 
12 |     var a = false;
13 | 
14 |     $("pre code").parent().each(function() 
15 |     {
16 |         if (!$(this).hasClass("prettyprint")) 
17 |         {
18 |             $(this).addClass("prettyprint");
19 |             a = true
20 |         }
21 |     });
22 |     
23 |     if (a) { prettyPrint() } 
24 | }


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/lisp.lisp:
--------------------------------------------------------------------------------
 1 | (defun prompt-for-cd ()
 2 |    "Prompts
 3 |     for CD"
 4 |    (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
 5 |    (prompt-read "Artist" &rest)
 6 |    (or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
 7 |   (if x (format t "yes") (format t "no" nil) ;and here comment
 8 |   ) 0xFFLL -23ull
 9 |   ;; second line comment
10 |   '(+ 1 2)
11 |   (defvar *lines*)                ; list of all lines
12 |   (position-if-not #'sys::whitespacep line :start beg))
13 |   (quote (privet 1 2 3))
14 |   '(hello world)
15 |   (* 5 7)
16 |   (1 2 34 5)
17 |   (:use "aaaa")
18 |   (let ((x 10) (y 20))
19 |     (print (+ x y))
20 |   ) LAmbDa
21 | 
22 |   "asdad\0eqweqe"


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/r.r:
--------------------------------------------------------------------------------
 1 | Call:
 2 | lm(formula = y ~ x)
 3 |  
 4 | Residuals:
 5 | 1       2       3       4       5       6
 6 | 3.3333 -0.6667 -2.6667 -2.6667 -0.6667  3.3333
 7 |  
 8 | Coefficients:
 9 |             Estimate Std. Error t value Pr(>|t|)
10 | (Intercept)  -9.3333     2.8441  -3.282 0.030453 *
11 | x             7.0000     0.7303   9.585 0.000662 ***
12 | ---
13 | Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
14 |  
15 | Residual standard error: 3.055 on 4 degrees of freedom
16 | Multiple R-squared: 0.9583,     Adjusted R-squared: 0.9478
17 | F-statistic: 91.88 on 1 and 4 DF,  p-value: 0.000662
18 |  
19 | > par(mfrow=c(2, 2))     # Request 2x2 plot layout
20 | > plot(lm_1)             # Diagnostic plot of regression model


--------------------------------------------------------------------------------
/doc/template/resources/javascripts/prettify-extension.js:
--------------------------------------------------------------------------------
 1 | // Stolen from StackOverflow. Find all 
 
 2 | // elements on the page and add the "prettyprint" style. If at least one 
 3 | // prettyprint element was found, call the Google Prettify prettyPrint() API.
 4 | //http://sstatic.net/so/js/master.js?v=6523
 5 | function styleCode() 
 6 | {
 7 |     if (typeof disableStyleCode != "undefined") 
 8 |     {
 9 |         return;
10 |     }
11 | 
12 |     var a = false;
13 | 
14 |     $("pre code").parent().each(function() 
15 |     {
16 |         if (!$(this).hasClass("prettyprint")) 
17 |         {
18 |             $(this).addClass("prettyprint");
19 |             a = true
20 |         }
21 |     });
22 |     
23 |     if (a) { prettyPrint() } 
24 | }


--------------------------------------------------------------------------------
/lib/ace/mode/latex.js:
--------------------------------------------------------------------------------
 1 | define(function(require, exports, module) {
 2 | "use strict";
 3 | 
 4 | var oop = require("../lib/oop");
 5 | var TextMode = require("./text").Mode;
 6 | var Tokenizer = require("../tokenizer").Tokenizer;
 7 | var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
 8 | var LatexFoldMode = require("./folding/latex").FoldMode;
 9 | var Range = require("../range").Range;
10 | 
11 | var Mode = function() {
12 |     this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules());
13 |     this.foldingRules = new LatexFoldMode();
14 | };
15 | oop.inherits(Mode, TextMode);
16 | 
17 | (function() {
18 |     this.lineCommentStart = "%";
19 | 
20 | }).call(Mode.prototype);
21 | 
22 | exports.Mode = Mode;
23 | 
24 | });
25 | 


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/toml.toml:
--------------------------------------------------------------------------------
 1 | # This is a TOML document. Boom.
 2 | 
 3 | title = "TOML Example"
 4 | 
 5 | [owner]
 6 | name = "Tom Preston-Werner"
 7 | organization = "GitHub"
 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not?
10 | 
11 | [database]
12 | server = "192.168.1.1"
13 | ports = [ 8001, 8001, 8002 ]
14 | connection_max = 5000
15 | enabled = true
16 | 
17 | [servers]
18 | 
19 |   # You can indent as you please. Tabs or spaces. TOML don't care.
20 |   [servers.alpha]
21 |   ip = "10.0.0.1"
22 |   dc = "eqdc10"
23 | 
24 |   [servers.beta]
25 |   ip = "10.0.0.2"
26 |   dc = "eqdc10"
27 | 
28 | [clients]
29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it


--------------------------------------------------------------------------------
/lib/ace/mode/_test/tokens_csharp.json:
--------------------------------------------------------------------------------
 1 | [[
 2 |    "start",
 3 |   ["keyword","public"],
 4 |   ["text"," "],
 5 |   ["keyword","void"],
 6 |   ["text"," "],
 7 |   ["identifier","HelloWorld"],
 8 |   ["paren.lparen","("],
 9 |   ["paren.rparen",")"],
10 |   ["text"," "],
11 |   ["paren.lparen","{"]
12 | ],[
13 |    "start",
14 |   ["text","    "],
15 |   ["comment","//Say Hello!"]
16 | ],[
17 |    "start",
18 |   ["text","    "],
19 |   ["identifier","Console"],
20 |   ["punctuation.operator","."],
21 |   ["identifier","WriteLine"],
22 |   ["paren.lparen","("],
23 |   ["string.start","\""],
24 |   ["string","Hello World"],
25 |   ["string.end","\""],
26 |   ["paren.rparen",")"],
27 |   ["punctuation.operator",";"]
28 | ],[
29 |    "start",
30 |   ["paren.rparen","}"]
31 | ]]


--------------------------------------------------------------------------------
/lib/ace/mode/groovy.js:
--------------------------------------------------------------------------------
 1 | define(function(require, exports, module) {
 2 | "use strict";
 3 | 
 4 | var oop = require("../lib/oop");
 5 | var JavaScriptMode = require("./javascript").Mode;
 6 | var Tokenizer = require("../tokenizer").Tokenizer;
 7 | var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
 8 | 
 9 | var Mode = function() {
10 |     JavaScriptMode.call(this);
11 |     var highlighter = new GroovyHighlightRules();
12 |     this.$tokenizer = new Tokenizer(highlighter.getRules());
13 |     this.$keywordList = highlighter.$keywordList;
14 | };
15 | oop.inherits(Mode, JavaScriptMode);
16 | 
17 | (function() {
18 | 
19 |     this.createWorker = function(session) {
20 |         return null;
21 |     };
22 | 
23 | }).call(Mode.prototype);
24 | 
25 | exports.Mode = Mode;
26 | });
27 | 


--------------------------------------------------------------------------------
/api/resources/javascripts/disqus-ext.js:
--------------------------------------------------------------------------------
 1 | function setupDisqus(href) {
 2 |     var disqus_shortname = 'aceapi';
 3 |     
 4 |     //var paths = window.location.pathname.split("/");
 5 |     //var fileName = paths[paths.length - 2] + "/" + paths[paths.length - 1];
 6 |     
 7 |     //var disqus_identifier = fileName;
 8 |     var disqus_identifier =  href.substring(2);
 9 |     
10 |     (function() {
11 |         if (document.getElementById("disqusScript") === null) {
12 |             var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
13 |             dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
14 |             (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);       
15 |         }
16 |     })();
17 | }


--------------------------------------------------------------------------------
/lib/ace/mode/java.js:
--------------------------------------------------------------------------------
 1 | define(function(require, exports, module) {
 2 | "use strict";
 3 | 
 4 | var oop = require("../lib/oop");
 5 | var JavaScriptMode = require("./javascript").Mode;
 6 | var Tokenizer = require("../tokenizer").Tokenizer;
 7 | var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
 8 | 
 9 | var Mode = function() {
10 |     JavaScriptMode.call(this);
11 |     var highlighter = new JavaHighlightRules();
12 |     
13 |     this.$tokenizer = new Tokenizer(highlighter.getRules());
14 |     this.$keywordList = highlighter.$keywordList;
15 | };
16 | oop.inherits(Mode, JavaScriptMode);
17 | 
18 | (function() {
19 |     
20 |     this.createWorker = function(session) {
21 |         return null;
22 |     };
23 | 
24 | }).call(Mode.prototype);
25 | 
26 | exports.Mode = Mode;
27 | });
28 | 


--------------------------------------------------------------------------------
/lib/ace/mode/scala.js:
--------------------------------------------------------------------------------
 1 | define(function(require, exports, module) {
 2 | "use strict";
 3 | 
 4 | var oop = require("../lib/oop");
 5 | var JavaScriptMode = require("./javascript").Mode;
 6 | var Tokenizer = require("../tokenizer").Tokenizer;
 7 | var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
 8 | 
 9 | var Mode = function() {
10 |     JavaScriptMode.call(this);
11 |     
12 |     var highlighter = new ScalaHighlightRules();
13 |     this.$tokenizer = new Tokenizer(highlighter.getRules());
14 |     this.$keywordList = highlighter.$keywordList;
15 | };
16 | oop.inherits(Mode, JavaScriptMode);
17 | 
18 | (function() {
19 | 
20 |     this.createWorker = function(session) {
21 |         return null;
22 |     };
23 | 
24 | }).call(Mode.prototype);
25 | 
26 | exports.Mode = Mode;
27 | });
28 | 


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/jade.jade:
--------------------------------------------------------------------------------
 1 | !!!doctype
 2 | !!!5
 3 | !!!
 4 | 
 5 | include something
 6 | 
 7 |          include another_thing
 8 | 
 9 |   // let's talk about it
10 | 
11 | // 
12 |   here it is. a block comment!
13 |  and another row!
14 | but not here.
15 | 
16 |      // 
17 |         a far spaced
18 |     should be lack of block
19 | 
20 |    // also not a comment
21 |      div.attemptAtBlock
22 |   
23 |   span#myName
24 | 
25 |   #{implicit}
26 |      !{more_explicit}
27 | 
28 |   #idDiv
29 | 
30 |     .idDiv
31 | 
32 |     test(id="tag")
33 |     header(id="tag", blah="foo", meh="aads")
34 | mixin article(obj, parents)
35 | 
36 |   mixin bleh()
37 | 
38 |     mixin clever-name
39 | 
40 |  -var x = "0";
41 |  - y each z
42 | 
43 |  - var items = ["one", "two", "three"]
44 |    each item in items
45 |     li= item


--------------------------------------------------------------------------------
/doc/template/resources/javascripts/disqus-ext.js:
--------------------------------------------------------------------------------
 1 | function setupDisqus(href) {
 2 |     var disqus_shortname = 'aceapi';
 3 |     
 4 |     //var paths = window.location.pathname.split("/");
 5 |     //var fileName = paths[paths.length - 2] + "/" + paths[paths.length - 1];
 6 |     
 7 |     //var disqus_identifier = fileName;
 8 |     var disqus_identifier =  href.substring(2);
 9 |     
10 |     (function() {
11 |         if (document.getElementById("disqusScript") === null) {
12 |             var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
13 |             dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
14 |             (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);       
15 |         }
16 |     })();
17 | }


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/golang.go:
--------------------------------------------------------------------------------
 1 | // Concurrent computation of pi.
 2 | // See http://goo.gl/ZuTZM.
 3 | //
 4 | // This demonstrates Go's ability to handle
 5 | // large numbers of concurrent processes.
 6 | // It is an unreasonable way to calculate pi.
 7 | package main
 8 | 
 9 | import (
10 |     "fmt"
11 |     "math"
12 | )
13 | 
14 | func main() {
15 |     fmt.Println(pi(5000))
16 | }
17 | 
18 | // pi launches n goroutines to compute an
19 | // approximation of pi.
20 | func pi(n int) float64 {
21 |     ch := make(chan float64)
22 |     for k := 0; k <= n; k++ {
23 |         go term(ch, float64(k))
24 |     }
25 |     f := 0.0
26 |     for k := 0; k <= n; k++ {
27 |         f += <-ch
28 |     }
29 |     return f
30 | }
31 | 
32 | func term(ch chan float64, k float64) {
33 |     ch <- 4 * math.Pow(-1, k) / (2*k + 1)
34 | }
35 | 


--------------------------------------------------------------------------------
/tool/wrap_keyword_regexp.js:
--------------------------------------------------------------------------------
 1 | // a little script to turn giant keyword regexps into
 2 | // something that ace can use; for example: 
 3 | //
 4 | // \b(NS(Rect(ToCGRect|FromCGRect)|MakeCollectable|S(tringFromProtocol))\b
 5 | // 
 6 | // into
 7 | //
 8 | // (?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol))(?:\b)
 9 | 
10 | var inputString = process.argv.splice(2)[0];
11 | 
12 | // solve word boundaries
13 | var outputString = inputString.replace(/\\b/g, "(?:\\\\b)");
14 | 
15 | // I apparently need to do this, instead of something clever, because the regexp
16 | // lastIndex is screwing up my positional
17 | outputString = outputString.split("b)(");
18 | 
19 | outputString = outputString[0] + "b)(" + outputString[1].replace(/\(([^\?])/g, "(?:$1");
20 | 
21 | console.log("\n\n" + outputString + "\n\n");


--------------------------------------------------------------------------------
/lib/ace/ext/themelist_utils/themes.js:
--------------------------------------------------------------------------------
 1 | define(function(require, exports, module) {
 2 | 
 3 | module.exports.themes = [
 4 |     "ambiance",
 5 |     "chaos",
 6 |     "chrome",
 7 |     "clouds",
 8 |     "clouds_midnight",
 9 |     "cobalt",
10 |     "crimson_editor",
11 |     "dawn",
12 |     "dreamweaver",
13 |     "eclipse",
14 |     "github",
15 |     "idle_fingers",
16 |     "kr_theme",
17 |     "merbivore",
18 |     "merbivore_soft",
19 |     "monokai",
20 |     "mono_industrial",
21 |     "pastel_on_dark",
22 |     "solarized_dark",
23 |     "solarized_light",
24 |     "terminal",
25 |     "textmate",
26 |     "tomorrow",
27 |     "tomorrow_night",
28 |     "tomorrow_night_blue",
29 |     "tomorrow_night_bright",
30 |     "tomorrow_night_eighties",
31 |     "twilight",
32 |     "vibrant_ink",
33 |     "xcode"
34 | ];
35 | 
36 | });


--------------------------------------------------------------------------------
/experiments/worker.html:
--------------------------------------------------------------------------------
 1 | 
 3 | 
 4 | 
 5 | 
 6 | 	
 7 | 	worker
 8 | 	
 9 | 	
10 | 	
11 | 
12 | 
13 | 
14 | 
31 | 
32 | 
33 | 
34 | 


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/perl.pl:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/perl
 2 | =begin
 3 |  perl example code for Ace
 4 | =cut
 5 | 
 6 | use strict;
 7 | use warnings;
 8 | my $num_primes = 0;
 9 | my @primes;
10 | 
11 | # Put 2 as the first prime so we won't have an empty array
12 | $primes[$num_primes] = 2;
13 | $num_primes++;
14 | 
15 | MAIN_LOOP:
16 | for my $number_to_check (3 .. 200)
17 | {
18 |     for my $p (0 .. ($num_primes-1))
19 |     {
20 |         if ($number_to_check % $primes[$p] == 0)
21 |         {
22 |             next MAIN_LOOP;
23 |         }
24 |     }
25 | 
26 |     # If we reached this point it means $number_to_check is not
27 |     # divisable by any prime number that came before it.
28 |     $primes[$num_primes] = $number_to_check;
29 |     $num_primes++;
30 | }
31 | 
32 | for my $p (0 .. ($num_primes-1))
33 | {
34 |     print $primes[$p], ", ";
35 | }
36 | print "\n";
37 | 
38 | 


--------------------------------------------------------------------------------
/lib/ace/mode/_test/text_ruby.txt:
--------------------------------------------------------------------------------
 1 |  #test: symbol tokenizer
 2 |   [:@thing, :$thing, :_thing, :thing, :Thing, :thing1, :thing_a,
 3 |               :THING, :thing!, :thing=, :thing?, :t?,
 4 |               :, :@, :$, :1, :1thing, :th?ing, :thi=ng, :1thing,
 5 |             :th!ing, :thing#
 6 |     ]
 7 | 
 8 |  #test: namespaces aren't symbols" : function() {
 9 |    Namespaced::Class
10 |  #test: hex tokenizer 
11 |     0x9a, 0XA1, 0x9_a, 0x, 0x_9a, 0x9a_,
12 |  #test: float tokenizer
13 |     [1, +1, -1, 12_345, 0.000_1,
14 |     _, 3_1, 1_2, 1_.0, 0._1];
15 |  
16 | {:id => 34, :key => "value"}
17 | 
18 | =begin
19 | =end
20 | 
21 | =begin x
22 | =end-
23 | =end   x
24 | 
25 |     herDocs = [<<'FOO', <
 3 | snippet dir
 4 | 	
 5 | 		DirectoryIndex ${2:index.html}
 6 | 		Order Deny,Allow
 7 | 		Deny from All
 8 | 	
 9 | #    
10 | snippet filesmatch
11 | 	
12 | 		${2}
13 | 	
14 | # 
15 | snippet ifmodule
16 | 	
17 | 		${2}
18 | 	
19 | # 
20 | snippet limitexcept
21 | 	
22 | 		${2}
23 | 	
24 | # 
25 | snippet proxy
26 | 	
27 | 		${2}
28 | 	
29 | # 
30 | snippet virtualhost
31 | 	
32 | 		ServerAdmin ${3:webmaster@example.com}
33 | 		DocumentRoot ${4:/www/example.com}
34 | 		ServerName ${5:www.example.com}
35 | 	
36 | 


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/clojure.clj:
--------------------------------------------------------------------------------
 1 | (defn parting
 2 |   "returns a String parting in a given language"
 3 |   ([] (parting "World"))
 4 |   ([name] (parting name "en"))
 5 |   ([name language]
 6 |     ; condp is similar to a case statement in other languages.
 7 |     ; It is described in more detail later.
 8 |     ; It is used here to take different actions based on whether the
 9 |     ; parameter "language" is set to "en", "es" or something else.
10 |     (condp = language
11 |       "en" (str "Goodbye, " name)
12 |       "es" (str "Adios, " name)
13 |       (throw (IllegalArgumentException.
14 |         (str "unsupported language " language))))))
15 | 
16 | (println (parting)) ; -> Goodbye, World
17 | (println (parting "Mark")) ; -> Goodbye, Mark
18 | (println (parting "Mark" "es")) ; -> Adios, Mark
19 | (println (parting "Mark", "xy")) ; -> java.lang.IllegalArgumentException: unsupported language xy


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/autohotkey.ahk:
--------------------------------------------------------------------------------
 1 | #NoEnv
 2 | SetBatchLines -1
 3 | 
 4 | CoordMode Mouse, Screen
 5 | OnExit GuiClose
 6 | 
 7 | zoom := 9
 8 | 
 9 | computeSize(){
10 | 	global as_x
11 | 	as_x := Round(ws_x/zoom/2 - 0.5)
12 | 	if (zoom>1) {
13 | 		pix := Round(zoom)
14 | 	} ele {
15 | 		pix := 1
16 | 	}
17 |     ToolTip Message %as_x% %zoom% %ws_x% %hws_x% 
18 | }
19 | 
20 | hdc_frame := DllCall("GetDC", UInt, MagnifierID)
21 | 
22 | ; comment
23 | DrawCross(byRef x="", rX,rY,z, dc){
24 |         ;specify the style, thickness and color of the cross lines
25 |     h_pen := DllCall( "gdi32.dll\CreatePen", Int, 0, Int, 1, UInt, 0x0000FF)
26 | }
27 | 
28 | ;Ctrl ^; Shift +; Win #; Alt !
29 | ^NumPadAdd::
30 | ^WheelUp::   
31 | ^;::   ;comment
32 |     If(zoom < ws_x and ( A_ThisHotKey = "^WheelUp" or A_ThisHotKey ="^NumPadAdd") )
33 | 		zoom *= 1.189207115         ; sqrt(sqrt(2))
34 | 	Gosub,setZoom
35 | return
36 | 


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/c9search.c9search_results:
--------------------------------------------------------------------------------
 1 | Searching for 'var' in /workspace/configs
 2 | 
 3 | configs/default.js:
 4 |     1: var fs = require("fs");
 5 | 	2: var argv = require('optimist').argv;
 6 | 	3: var path = require("path");
 7 | 	5: var clientExtensions = {};
 8 | 	6: var clientDirs = fs.readdirSync(__dirname + "/../plugins-client");
 9 | 	7: for (var i = 0; i < clientDirs.length; i++) {
10 | 	8:     var dir = clientDirs[i];
11 | 	12:     var name = dir.split(".")[1];
12 | 	16: var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();
13 | 	17: var fsUrl = "/workspace";
14 | 	19: var port = argv.p || process.env.PORT || 3131;
15 | 	20: var host = argv.l || "localhost";
16 | 	22: var config = {
17 | 
18 | configs/local.js:
19 | 	2: var config = require("./default");
20 | 
21 | configs/packed.js:
22 | 	1: var config = require("./default");
23 | 
24 | 
25 | Found 15 matches in 3 files


--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY : doc build clean dist
 2 | 
 3 | pre_build:
 4 | 	git rev-parse HEAD > .git-ref
 5 | 	mkdir -p build/src
 6 | 	mkdir -p build/demo/kitchen-sink
 7 | 	mkdir -p build/textarea/src
 8 | 	
 9 | 	cp -r demo/kitchen-sink/styles.css build/demo/kitchen-sink/styles.css
10 | 	cp demo/kitchen-sink/logo.png build/demo/kitchen-sink/logo.png
11 | 	cp -r doc/site/images build/textarea
12 | 
13 | build: pre_build
14 | 	./Makefile.dryice.js normal
15 | 	./Makefile.dryice.js demo
16 | 	./Makefile.dryice.js bm
17 | 
18 | doc:
19 | 	cd doc;\
20 | 	(test -d node_modules && npm update) || npm install;\
21 | 	node build.js
22 | 
23 | clean:
24 | 	rm -rf build
25 | 	rm -rf ace-*
26 | 	rm -f ace-*.tgz
27 | 
28 | ace.tgz: build
29 | 	mv build ace-`./version.js`/
30 | 	cp Readme.md ace-`./version.js`/
31 | 	cp LICENSE ace-`./version.js`/
32 | 	tar cvfz ace-`./version.js`.tgz ace-`./version.js`/
33 | 
34 | dist: clean build ace.tgz
35 | 


--------------------------------------------------------------------------------
/demo/kitchen-sink/docs/yaml.yaml:
--------------------------------------------------------------------------------
 1 | # This sample document was taken from wikipedia:
 2 | # http://en.wikipedia.org/wiki/YAML#Sample_document
 3 | ---
 4 | receipt:     Oz-Ware Purchase Invoice
 5 | date:        2007-08-06
 6 | customer:
 7 |     given:   Dorothy
 8 |     family:  Gale
 9 | 
10 | items:
11 |     - part_no:   'A4786'
12 |       descrip:   Water Bucket (Filled)
13 |       price:     1.47
14 |       quantity:  4
15 | 
16 |     - part_no:   'E1628'
17 |       descrip:   High Heeled "Ruby" Slippers
18 |       size:      8
19 |       price:     100.27
20 |       quantity:  1
21 | 
22 | bill-to:  &id001
23 |     street: |
24 |             123 Tornado Alley
25 |             Suite 16
26 |     city:   East Centerville
27 |     state:  KS
28 | 
29 | ship-to:  *id001
30 | 
31 | specialDelivery:  >
32 |     Follow the Yellow Brick
33 |     Road to the Emerald City.
34 |     Pay no attention to the
35 |     man behind the curtain.
36 | 


--------------------------------------------------------------------------------
/lib/ace/snippets/sql.snippets:
--------------------------------------------------------------------------------
 1 | snippet tbl
 2 | 	create table ${1:table} (
 3 | 		${2:columns}
 4 | 	);
 5 | snippet col
 6 | 	${1:name}	${2:type}	${3:default ''}	${4:not null}
 7 | snippet ccol
 8 | 	${1:name}	varchar2(${2:size})	${3:default ''}	${4:not null}
 9 | snippet ncol
10 | 	${1:name}	number	${3:default 0}	${4:not null}
11 | snippet dcol
12 | 	${1:name}	date	${3:default sysdate}	${4:not null}
13 | snippet ind
14 | 	create index ${3:$1_$2} on ${1:table}(${2:column});
15 | snippet uind
16 | 	create unique index ${1:name} on ${2:table}(${3:column});
17 | snippet tblcom
18 | 	comment on table ${1:table} is '${2:comment}';
19 | snippet colcom
20 | 	comment on column ${1:table}.${2:column} is '${3:comment}';
21 | snippet addcol
22 | 	alter table ${1:table} add (${2:column} ${3:type});
23 | snippet seq
24 | 	create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};
25 | snippet s*
26 | 	select * from ${1:table}
27 | 


--------------------------------------------------------------------------------
/experiments/triple_click.html:
--------------------------------------------------------------------------------
 1 | 
 3 | 
 4 | 
 5 | 
 6 | 	
 7 | 	triple_click
 8 | 	
 9 | 
10 | 
11 | 
12 | 
13 | 
14 | Juhu Kinners 15 |
16 | 17 | 18 | 19 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/stylus.styl: -------------------------------------------------------------------------------- 1 | // I'm a comment! 2 | 3 | /* 4 | * Adds the given numbers together. 5 | */ 6 | 7 | 8 | /*! 9 | * Adds the given numbers together. 10 | */ 11 | 12 | 13 | asdasdasdad(df, ad=23) 14 | 15 | add(a, b = a) 16 | a + b 17 | green(#0c0) 18 | add(10, 5) 19 | // => 15 20 | 21 | add(10) 22 | add(a, b) 23 | 24 | &asdasd 25 | 26 | (arguments) 27 | 28 | @sdfsdf 29 | .signatures 30 | background-color #e0e8e0 31 | border 1px solid grayLighter 32 | box-shadow 0 0 3px grayLightest 33 | border-radius 3px 34 | padding 3px 5px 35 | "adsads" 36 | margin-left 0 37 | list-style none 38 | .signature 39 | list-style none 40 | display: inline 41 | margin-left 0 42 | > li 43 | display inline 44 | is not 45 | .signature-values 46 | list-style none 47 | display inline 48 | margin-left 0 49 | &:before 50 | content '→' 51 | margin 0 5px 52 | > li 53 | !important 54 | 55 | unless -------------------------------------------------------------------------------- /api/index.html: -------------------------------------------------------------------------------- 1 | 2 |
-------------------------------------------------------------------------------- /demo/kitchen-sink/docs/sass.sass: -------------------------------------------------------------------------------- 1 | // sass ace mode; 2 | 3 | @import url(http://fonts.googleapis.com/css?family=Ace:700) 4 | 5 | html, body 6 | :background-color #ace 7 | text-align: center 8 | height: 100% 9 | /*;*********; 10 | ;comment ; 11 | ;*********; 12 | 13 | .toggle 14 | $size: 14px 15 | 16 | :background url(http://subtlepatterns.com/patterns/dark_stripes.png) 17 | border-radius: 8px 18 | height: $size 19 | 20 | &:before 21 | $radius: $size * 0.845 22 | $glow: $size * 0.125 23 | 24 | box-shadow: 0 0 $glow $glow / 2 #fff 25 | border-radius: $radius 26 | 27 | &:active 28 | ~ .button 29 | box-shadow: 0 15px 25px -4px rgba(0,0,0,0.4) 30 | ~ .label 31 | font-size: 40px 32 | color: rgba(0,0,0,0.45) 33 | 34 | &:checked 35 | ~ .button 36 | box-shadow: 0 15px 25px -4px #ace 37 | ~ .label 38 | font-size: 40px 39 | color: #c9c9c9 40 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/cpp.cpp: -------------------------------------------------------------------------------- 1 | // compound assignment operators 2 | 3 | #include 4 | 5 | #include \ 6 | 7 | 8 | #include \ 9 | \ 10 | 11 | 12 | #include \ 13 | \ 14 | "iostream" 15 | 16 | #include 17 | #include "boost/asio/io_service.hpp" 18 | 19 | #include \ 20 | \ 21 | "iostream" \ 22 | "string" \ 23 | 24 | 25 | using namespace std; 26 | 27 | int main () 28 | { 29 | int a, b=3; /* foobar */ 30 | a = b; 31 | a+=2; // equivalent to a=a+2 32 | cout << a; 33 | #if VERBOSE >= 2 34 | prints("trace message"); 35 | #endif 36 | return 0; 37 | } 38 | 39 | /* Print an error message and get out */ 40 | #define ABORT \ 41 | do { \ 42 | print( "Abort\n" ); \ 43 | exit(8); \ 44 | } while (0) /* Note: No semicolon */ -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/latex.tex: -------------------------------------------------------------------------------- 1 | \usepackage{amsmath} 2 | \title{\LaTeX} 3 | \date{} 4 | \begin{document} 5 | \maketitle 6 | \LaTeX{} is a document preparation system for the \TeX{} 7 | typesetting program. It offers programmable desktop publishing 8 | features and extensive facilities for automating most aspects of 9 | typesetting and desktop publishing, including numbering and 10 | cross-referencing, tables and figures, page layout, bibliographies, 11 | and much more. \LaTeX{} was originally written in 1984 by Leslie 12 | Lamport and has become the dominant method for using \TeX; few 13 | people write in plain \TeX{} anymore. The current version is 14 | \LaTeXe. 15 | 16 | % This is a comment; it will not be shown in the final output. 17 | % The following shows a little of the typesetting power of LaTeX: 18 | \begin{align} 19 | E &= mc^2 \\ 20 | m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}} 21 | \end{align} 22 | \end{document} -------------------------------------------------------------------------------- /demo/kitchen-sink/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | width: 100%; 4 | overflow: hidden; 5 | } 6 | 7 | body { 8 | overflow: hidden; 9 | margin: 0; 10 | padding: 0; 11 | height: 100%; 12 | width: 100%; 13 | font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif; 14 | font-size: 12px; 15 | background: rgb(14, 98, 165); 16 | color: white; 17 | } 18 | 19 | #logo { 20 | padding: 15px; 21 | margin-left: 70px; 22 | border: none; 23 | } 24 | 25 | #editor-container { 26 | position: absolute; 27 | top: 0px; 28 | left: 280px; 29 | bottom: 0px; 30 | right: 0px; 31 | background: white; 32 | } 33 | 34 | #controls { 35 | padding: 5px; 36 | } 37 | 38 | #controls td { 39 | text-align: right; 40 | } 41 | 42 | #controls td + td { 43 | text-align: left; 44 | } 45 | .ace_status-indicator { 46 | color: gray; 47 | position: absolute; 48 | right: 0; 49 | border-left: 1px solid; 50 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/velocity.vm: -------------------------------------------------------------------------------- 1 | #* 2 | This is a sample comment block that 3 | spans multiple lines. 4 | *# 5 | 6 | #macro ( outputItem $item ) 7 |
  • ${item}
  • 8 | #end 9 | 10 | ## Define the items to iterate 11 | #set ( $items = [1, 2, 3, 4] ) 12 | 13 |
      14 | ## Iterate over the items and output the evens. 15 | #foreach ( $item in $items ) 16 | #if ( $_MathTool.mod($item, 2) == 0 ) 17 | #outputItem ($item) 18 | #end 19 | #end 20 |
    21 | 22 | 33 | 34 | -------------------------------------------------------------------------------- /lib/ace/snippets/mako.snippets: -------------------------------------------------------------------------------- 1 | snippet def 2 | <%def name="${1:name}"> 3 | ${2:} 4 | 5 | snippet call 6 | <%call expr="${1:name}"> 7 | ${2:} 8 | 9 | snippet doc 10 | <%doc> 11 | ${1:} 12 | 13 | snippet text 14 | <%text> 15 | ${1:} 16 | 17 | snippet for 18 | % for ${1:i} in ${2:iter}: 19 | ${3:} 20 | % endfor 21 | snippet if if 22 | % if ${1:condition}: 23 | ${2:} 24 | % endif 25 | snippet if if/else 26 | % if ${1:condition}: 27 | ${2:} 28 | % else: 29 | ${3:} 30 | % endif 31 | snippet try 32 | % try: 33 | ${1:} 34 | % except${2:}: 35 | ${3:pass} 36 | % endtry 37 | snippet wh 38 | % while ${1:}: 39 | ${2:} 40 | % endwhile 41 | snippet $ 42 | ${ ${1:} } 43 | snippet <% 44 | <% ${1:} %> 45 | snippet 47 | snippet inherit 48 | <%inherit file="${1:filename}" /> 49 | snippet include 50 | <%include file="${1:filename}" /> 51 | snippet namespace 52 | <%namespace file="${1:name}" /> 53 | snippet page 54 | <%page args="${1:}" /> 55 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/tokens_xquery.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "[\"start\"]", 3 | ["keyword","xquery"], 4 | ["text"," "], 5 | ["keyword","version"], 6 | ["text"," "], 7 | ["string","\""], 8 | ["string","1.0"], 9 | ["string","\""], 10 | ["text",";"] 11 | ],[ 12 | "[\"start\"]" 13 | ],[ 14 | "[\"start\"]", 15 | ["keyword","let"], 16 | ["text"," "], 17 | ["variable","$message"], 18 | ["text"," "], 19 | ["keyword.operator",":="], 20 | ["text"," "], 21 | ["string","\""], 22 | ["string","Hello World!"], 23 | ["string","\""] 24 | ],[ 25 | "[\"start\",\"StartTag\",\"TagContent\"]", 26 | ["keyword","return"], 27 | ["text"," "], 28 | ["meta.tag",""] 30 | ],[ 31 | "[\"start\",\"StartTag\",\"TagContent\"]", 32 | ["text"," "], 33 | ["meta.tag",""], 35 | ["text","{"], 36 | ["variable","$message"], 37 | ["text","}"], 38 | ["meta.tag",""] 39 | ],[ 40 | "[\"start\"]", 41 | ["meta.tag",""] 42 | ],[ 43 | "[\"start\"]" 44 | ]] -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/vbscript.vbs: -------------------------------------------------------------------------------- 1 | myfilename = "C:\Wikipedia - VBScript - Example - Hello World.txt" 2 | MakeHelloWorldFile myfilename 3 | 4 | Sub MakeHelloWorldFile (FileName) 5 | 'Create a new file in C: drive or overwrite existing file 6 | Set FSO = CreateObject("Scripting.FileSystemObject") 7 | If FSO.FileExists(FileName) Then 8 | Answer = MsgBox ("File " & FileName & " exists ... OK to overwrite?", vbOKCancel) 9 | 'If button selected is not OK, then quit now 10 | 'vbOK is a language constant 11 | If Answer <> vbOK Then Exit Sub 12 | Else 13 | 'Confirm OK to create 14 | Answer = MsgBox ("File " & FileName & " ... OK to create?", vbOKCancel) 15 | If Answer <> vbOK Then Exit Sub 16 | End If 17 | 'Create new file (or replace an existing file) 18 | Set FileObject = FSO.CreateTextFile (FileName) 19 | FileObject.WriteLine "Time ... " & Now() 20 | FileObject.WriteLine "Hello World" 21 | FileObject.Close() 22 | MsgBox "File " & FileName & " ... updated." 23 | End Sub -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ace", 3 | "description": "Ajax.org Code Editor is a full featured source code highlighting editor that powers the Cloud9 IDE", 4 | "version": "1.0.0", 5 | "homepage" : "http://github.com/ajaxorg/ace", 6 | "engines": {"node": ">= 0.6.0"}, 7 | "author": "Fabian Jakobs ", 8 | "main": "lib/ace", 9 | "repository" : { 10 | "type" : "git", 11 | "url" : "http://github.com/ajaxorg/ace.git" 12 | }, 13 | "dependencies": { 14 | "mime": "1.2.x" 15 | }, 16 | "devDependencies": { 17 | "asyncjs": "0.0.x", 18 | "jsdom": "0.2.x", 19 | "amd-loader": "~0.0.4", 20 | "dryice": "0.4.10" 21 | }, 22 | "mappings": { 23 | "ace": "." 24 | }, 25 | "licenses": [{ 26 | "type": "BSD New", 27 | "url": "http://opensource.org/licenses/BSD-3-Clause" 28 | }], 29 | "directories": { 30 | "lib": "lib/ace" 31 | }, 32 | "scripts": { 33 | "test": "node lib/ace/test/all.js" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/tcl.tcl: -------------------------------------------------------------------------------- 1 | 2 | proc dijkstra {graph origin} { 3 | # Initialize 4 | dict for {vertex distmap} $graph { 5 | dict set dist $vertex Inf 6 | dict set path $vertex {} 7 | } 8 | dict set dist $origin 0 9 | dict set path $origin [list $origin] 10 | 11 | while {[dict size $graph]} { 12 | # Find unhandled node with least weight 13 | set d Inf 14 | dict for {uu -} $graph { 15 | if {$d > [set dd [dict get $dist $uu]]} { 16 | set u $uu 17 | set d $dd 18 | } 19 | } 20 | 21 | # No such node; graph must be disconnected 22 | if {$d == Inf} break 23 | 24 | # Update the weights for nodes\ 25 | lead to by the node we've picked 26 | dict for {v dd} [dict get $graph $u] { 27 | if {[dict exists $graph $v]} { 28 | set alt [expr {$d + $dd}] 29 | if {$alt < [dict get $dist $v]} { 30 | dict set dist $v $alt 31 | dict set path $v [list {*}[dict get $path $u] $v] 32 | } 33 | } 34 | } 35 | 36 | # Remove chosen node from graph still to be handled 37 | dict unset graph $u 38 | } 39 | return [list $dist $path] 40 | } -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/haml.haml: -------------------------------------------------------------------------------- 1 | !!!5 2 | 3 | # 4 | # 5 | # 6 | # 7 | 8 | 9 | /adasdasdad 10 | %div{:id => "#{@item.type}_#{@item.number}", :class => '#{@item.type} #{@item.urgency}', :phoney => `asdasdasd`} 11 | / file: app/views/movies/index.html.haml 12 | \d 13 | %ads:{:bleh => 33} 14 | %p==ddd== 15 | Date/Time: 16 | - now = DateTime.now 17 | %strong= now 18 | = if now DateTime.parse("December 31, 2006") 19 | = "Happy new " + "year!" 20 | %sfd.dfdfg 21 | #content 22 | .title 23 | %h1= @title 24 | = link_to 'Home', home_url 25 | 26 | #contents 27 | %div#content 28 | %div.articles 29 | %div.article.title Blah 30 | %div.article.date 2006-11-05 31 | %div.article.entry 32 | Neil Patrick Harris 33 | 34 | %div[@user, :greeting] 35 | %bar[290]/ 36 | ==Hello!== 37 | -------------------------------------------------------------------------------- /lib/ace/test/tests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ace Unit Tests 7 | 21 | 22 | 23 | 24 |
    25 | 26 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/tokens_xml.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["meta.tag","<"], 4 | ["meta.tag.tag-name","Juhu"], 5 | ["meta.tag.r",">"], 6 | ["text","//Juhu Kinners"], 7 | ["meta.tag",""] 10 | ],[ 11 | "start", 12 | ["text","test: two tags in the same lines should be in separate tokens\""] 13 | ],[ 14 | "start", 15 | ["meta.tag","<"], 16 | ["meta.tag.tag-name","Juhu"], 17 | ["meta.tag.r",">"], 18 | ["meta.tag","<"], 19 | ["meta.tag.tag-name","Kinners"], 20 | ["meta.tag.r",">"] 21 | ],[ 22 | "start", 23 | ["text","test: multiline attributes\""] 24 | ],[ 25 | "tag_qqstring", 26 | ["meta.tag","<"], 27 | ["meta.tag.tag-name","copy"], 28 | ["text"," "], 29 | ["entity.other.attribute-name","set"], 30 | ["keyword.operator","="], 31 | ["string","\"{"] 32 | ],[ 33 | "tag_qqstring", 34 | ["string","}\""], 35 | ["text"," "], 36 | ["entity.other.attribute-name","undo"], 37 | ["keyword.operator","="], 38 | ["string","\"{"] 39 | ],[ 40 | "start", 41 | ["string","}\""], 42 | ["meta.tag.r","/>"] 43 | ]] -------------------------------------------------------------------------------- /lib/ace/snippets/cmake.snippets: -------------------------------------------------------------------------------- 1 | snippet cmake 2 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 3 | PROJECT(${1:ProjectName}) 4 | 5 | FIND_PACKAGE(${2:LIBRARY}) 6 | 7 | INCLUDE_DIRECTORIES( 8 | ${$2_INCLUDE_DIR} 9 | ) 10 | 11 | ADD_SUBDIRECTORY(${3:src}) 12 | 13 | ADD_EXECUTABLE($1) 14 | 15 | TARGET_LINK_LIBRARIES($1 16 | ${$2_LIBRARIES} 17 | ) 18 | 19 | snippet include 20 | INCLUDE_DIRECTORIES( 21 | ${${1:INCLUDE_DIR}} 22 | ) 23 | 24 | snippet find 25 | FIND_PACKAGE(${1:LIBRARY}) 26 | 27 | snippet glob 28 | FILE(GLOB ${1:SRCS} *.${2:cpp}) 29 | 30 | snippet subdir 31 | ADD_SUBDIRECTORY(${1:src}) 32 | 33 | snippet lib 34 | ADD_LIBRARY(${1:lib} ${2:STATIC} 35 | ${${3:SRCS}} 36 | ) 37 | 38 | snippet link 39 | TARGET_LINK_LIBRARIES(${1:bin} 40 | ${2:somelib} 41 | ) 42 | 43 | snippet bin 44 | ADD_EXECUTABLE(${1:bin}) 45 | 46 | snippet set 47 | SET(${1:var} ${2:val}) 48 | 49 | snippet dep 50 | ADD_DEPENDENCIES(${1:target} 51 | ${2:dep} 52 | ) 53 | 54 | snippet props 55 | SET_TARGET_PROPERTIES(${1:target} 56 | ${2:PROPERTIES} ${3:COMPILE_FLAGS} 57 | ${4:"-O3 -Wall -pedantic"} 58 | ) 59 | -------------------------------------------------------------------------------- /demo/requirejs+build.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Editor 7 | 21 | 22 | 23 | 24 |
    function foo(items) {
    25 |     var i;
    26 |     for (i = 0; i < items.length; i++) {
    27 |         alert("Ace Rocks " + items[i]);
    28 |     }
    29 | }
    30 | 31 | 32 | 33 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /experiments/capture.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 |
    21 | 22 |
    23 | 24 | 25 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/abap.abap: -------------------------------------------------------------------------------- 1 | *************************************** 2 | ** Program: EXAMPLE ** 3 | ** Author: Joe Byte, 07-Jul-2007 ** 4 | *************************************** 5 | 6 | REPORT BOOKINGS. 7 | 8 | * Read flight bookings from the database 9 | SELECT * FROM FLIGHTINFO 10 | WHERE CLASS = 'Y' "Y = economy 11 | OR CLASS = 'C'. "C = business 12 | (...) 13 | 14 | REPORT TEST. 15 | WRITE 'Hello World'. 16 | 17 | USERPROMPT = 'Please double-click on a line in the output list ' & 18 | 'to see the complete details of the transaction.'. 19 | 20 | 21 | DATA LAST_EOM TYPE D. "last end-of-month date 22 | 23 | * Start from today's date 24 | LAST_EOM = SY-DATUM. 25 | * Set characters 6 and 7 (0-relative) of the YYYYMMDD string to "01", 26 | * giving the first day of the current month 27 | LAST_EOM+6(2) = '01'. 28 | * Subtract one day 29 | LAST_EOM = LAST_EOM - 1. 30 | 31 | WRITE: 'Last day of previous month was', LAST_EOM. 32 | 33 | DATA : BEGIN OF I_VBRK OCCURS 0, 34 | VBELN LIKE VBRK-VBELN, 35 | ZUONR LIKE VBRK-ZUONR, 36 | END OF I_VBRK. -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/lua.lua: -------------------------------------------------------------------------------- 1 | --[[-- 2 | num_args takes in 5.1 byte code and extracts the number of arguments 3 | from its function header. 4 | --]]-- 5 | 6 | function int(t) 7 | return t:byte(1)+t:byte(2)*0x100+t:byte(3)*0x10000+t:byte(4)*0x1000000 8 | end 9 | 10 | function num_args(func) 11 | local dump = string.dump(func) 12 | local offset, cursor = int(dump:sub(13)), offset + 26 13 | --Get the params and var flag (whether there's a ... in the param) 14 | return dump:sub(cursor):byte(), dump:sub(cursor+1):byte() 15 | end 16 | 17 | -- Usage: 18 | num_args(function(a,b,c,d, ...) end) -- return 4, 7 19 | 20 | -- Python styled string format operator 21 | local gm = debug.getmetatable("") 22 | 23 | gm.__mod=function(self, other) 24 | if type(other) ~= "table" then other = {other} end 25 | for i,v in ipairs(other) do other[i] = tostring(v) end 26 | return self:format(unpack(other)) 27 | end 28 | 29 | print([===[ 30 | blah blah %s, (%d %d) 31 | ]===]%{"blah", num_args(int)}) 32 | 33 | --[=[-- 34 | table.maxn is deprecated, use # instead. 35 | --]=]-- 36 | print(table.maxn{1,2,[4]=4,[8]=8) -- outputs 8 instead of 2 37 | -------------------------------------------------------------------------------- /lib/ace/snippets/htmltornado.snippets: -------------------------------------------------------------------------------- 1 | # Generic tags 2 | 3 | snippet { 4 | {{ ${1} }} 5 | 6 | # Template tags 7 | 8 | snippet extends 9 | {% extends "${1:base.html}" %} 10 | snippet autoescape 11 | {% autoescape ${1:xhtml_escape | None} %} 12 | snippet apply 13 | {% apply ${1:function} %} 14 | ${2} 15 | {% end %} 16 | snippet block 17 | {% block ${1} %} 18 | ${2} 19 | {% end %} 20 | snippet for 21 | {% for ${1:item} in ${2} %} 22 | ${3} 23 | {% end %} 24 | snippet from 25 | {% from ${1:x} import ${2:y} %} 26 | snippet if 27 | {% if ${1:condition} %} 28 | ${2} 29 | {% end %} 30 | snippet elif 31 | {% elif ${1:condition} %} 32 | snippet else 33 | {% else %} 34 | snippet import 35 | {% import ${1:module} %} 36 | snippet include 37 | {% include "${1:filename}" %} 38 | snippet module 39 | {% module ${1:expression} %} 40 | snippet raw 41 | {% raw ${1:expression} %} 42 | snippet set 43 | {% set ${1:x} = ${2:y} %} 44 | snippet try 45 | {% try %} 46 | ${1} 47 | {% except %} 48 | ${2} 49 | {% finallly %} 50 | ${3} 51 | {% end %} 52 | snippet while 53 | {% while ${1:condition} %} 54 | ${2} 55 | {% end %} 56 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/tokens_jsx.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "comment", 3 | ["comment","/*EXPECTED"] 4 | ],[ 5 | "comment", 6 | ["comment","hello world!"] 7 | ],[ 8 | "start", 9 | ["comment","*/"] 10 | ],[ 11 | "start", 12 | ["keyword","class"], 13 | ["text"," "], 14 | ["language.support.class","Test"], 15 | ["text"," "], 16 | ["paren.lparen","{"] 17 | ],[ 18 | "start", 19 | ["text"," "], 20 | ["keyword","static"], 21 | ["text"," "], 22 | ["storage.type","function"], 23 | ["text"," "], 24 | ["entity.name.function","run"], 25 | ["paren.lparen","("], 26 | ["paren.rparen",")"], 27 | ["text"," "], 28 | ["punctuation.operator",":"], 29 | ["text"," "], 30 | ["keyword","void"], 31 | ["text"," "], 32 | ["paren.lparen","{"] 33 | ],[ 34 | "start", 35 | ["text"," "], 36 | ["comment","// console.log(\"hello world!\");"] 37 | ],[ 38 | "start", 39 | ["text"," "], 40 | ["keyword","log"], 41 | ["text"," "], 42 | ["string","\"hello world!\""], 43 | ["punctuation.operator",";"] 44 | ],[ 45 | "start", 46 | ["text"," "], 47 | ["paren.rparen","}"] 48 | ],[ 49 | "start", 50 | ["paren.rparen","}"] 51 | ]] -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/forth.frt: -------------------------------------------------------------------------------- 1 | : HELLO ( -- ) CR ." Hello, world!" ; 2 | 3 | HELLO 4 | Hello, world! 5 | 6 | : [CHAR] CHAR POSTPONE LITERAL ; IMMEDIATE 7 | 8 | 0 value ii 0 value jj 9 | 0 value KeyAddr 0 value KeyLen 10 | create SArray 256 allot \ state array of 256 bytes 11 | : KeyArray KeyLen mod KeyAddr ; 12 | 13 | : get_byte + c@ ; 14 | : set_byte + c! ; 15 | : as_byte 255 and ; 16 | : reset_ij 0 TO ii 0 TO jj ; 17 | : i_update 1 + as_byte TO ii ; 18 | : j_update ii SArray get_byte + as_byte TO jj ; 19 | : swap_s_ij 20 | jj SArray get_byte 21 | ii SArray get_byte jj SArray set_byte 22 | ii SArray set_byte 23 | ; 24 | 25 | : rc4_init ( KeyAddr KeyLen -- ) 26 | 256 min TO KeyLen TO KeyAddr 27 | 256 0 DO i i SArray set_byte LOOP 28 | reset_ij 29 | BEGIN 30 | ii KeyArray get_byte jj + j_update 31 | swap_s_ij 32 | ii 255 < WHILE 33 | ii i_update 34 | REPEAT 35 | reset_ij 36 | ; 37 | : rc4_byte 38 | ii i_update jj j_update 39 | swap_s_ij 40 | ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor 41 | ; -------------------------------------------------------------------------------- /demo/settings_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Editor 7 | 21 | 22 | 23 | 24 |
    
    25 |     
    26 | 
    27 | 
    28 | 
    42 | 
    43 | 
    44 | 
    45 | 
    46 | 
    
    
    --------------------------------------------------------------------------------
    /lib/ace/worker/mirror.js:
    --------------------------------------------------------------------------------
     1 | define(function(require, exports, module) {
     2 | "use strict";
     3 | 
     4 | var Document = require("../document").Document;
     5 | var lang = require("../lib/lang");
     6 |     
     7 | var Mirror = exports.Mirror = function(sender) {
     8 |     this.sender = sender;
     9 |     var doc = this.doc = new Document("");
    10 |     
    11 |     var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
    12 |     
    13 |     var _self = this;
    14 |     sender.on("change", function(e) {
    15 |         doc.applyDeltas(e.data);
    16 |         deferredUpdate.schedule(_self.$timeout);
    17 |     });
    18 | };
    19 | 
    20 | (function() {
    21 |     
    22 |     this.$timeout = 500;
    23 |     
    24 |     this.setTimeout = function(timeout) {
    25 |         this.$timeout = timeout;
    26 |     };
    27 |     
    28 |     this.setValue = function(value) {
    29 |         this.doc.setValue(value);
    30 |         this.deferredUpdate.schedule(this.$timeout);
    31 |     };
    32 |     
    33 |     this.getValue = function(callbackId) {
    34 |         this.sender.callback(this.doc.getValue(), callbackId);
    35 |     };
    36 |     
    37 |     this.onUpdate = function() {
    38 |         // abstract method
    39 |     };
    40 |     
    41 | }).call(Mirror.prototype);
    42 | 
    43 | });
    44 | 
    
    
    --------------------------------------------------------------------------------
    /lib/ace/mode/_test/tokens_sql.json:
    --------------------------------------------------------------------------------
     1 | [[
     2 |    "start",
     3 |   ["keyword","SELECT"],
     4 |   ["text"," "],
     5 |   ["identifier","city"],
     6 |   ["text",", "],
     7 |   ["support.function","COUNT"],
     8 |   ["paren.lparen","("],
     9 |   ["identifier","id"],
    10 |   ["paren.rparen",")"],
    11 |   ["text"," "],
    12 |   ["keyword","AS"],
    13 |   ["text"," "],
    14 |   ["identifier","users_count"]
    15 | ],[
    16 |    "start",
    17 |   ["keyword","FROM"],
    18 |   ["text"," "],
    19 |   ["identifier","users"]
    20 | ],[
    21 |    "start",
    22 |   ["keyword","WHERE"],
    23 |   ["text"," "],
    24 |   ["identifier","group_name"],
    25 |   ["text"," "],
    26 |   ["keyword.operator","="],
    27 |   ["text"," "],
    28 |   ["string","'salesman'"]
    29 | ],[
    30 |    "start",
    31 |   ["keyword","AND"],
    32 |   ["text"," "],
    33 |   ["identifier","created"],
    34 |   ["text"," "],
    35 |   ["keyword.operator",">"],
    36 |   ["text"," "],
    37 |   ["string","'2011-05-21'"]
    38 | ],[
    39 |    "start",
    40 |   ["keyword","GROUP"],
    41 |   ["text"," "],
    42 |   ["keyword","BY"],
    43 |   ["text"," "],
    44 |   ["constant.numeric","1"]
    45 | ],[
    46 |    "start",
    47 |   ["keyword","ORDER"],
    48 |   ["text"," "],
    49 |   ["keyword","BY"],
    50 |   ["text"," "],
    51 |   ["constant.numeric","2"],
    52 |   ["text"," "],
    53 |   ["keyword","DESC"]
    54 | ]]
    
    
    --------------------------------------------------------------------------------
    /lib/ace/mode/latex_highlight_rules.js:
    --------------------------------------------------------------------------------
     1 | define(function(require, exports, module) {
     2 | "use strict";
     3 | 
     4 | var oop = require("../lib/oop");
     5 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
     6 | 
     7 | var LatexHighlightRules = function() {   
     8 |     this.$rules = {
     9 |         "start" : [{
    10 |             // A tex command e.g. \foo
    11 |             token : "keyword",
    12 |             regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
    13 |         }, {
    14 |             // Curly and square braces
    15 |             token : "lparen",
    16 |             regex : "[[({]"
    17 |         }, {
    18 |             // Curly and square braces
    19 |             token : "rparen",
    20 |             regex : "[\\])}]"
    21 |         }, {
    22 |             // Inline math between two $ symbols
    23 |             token : "string",
    24 |             regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
    25 |         }, {
    26 |             // A comment. Tex comments start with % and go to 
    27 |             // the end of the line
    28 |             token : "comment",
    29 |             regex : "%.*$"
    30 |         }]
    31 |     };
    32 | };
    33 | 
    34 | oop.inherits(LatexHighlightRules, TextHighlightRules);
    35 | 
    36 | exports.LatexHighlightRules = LatexHighlightRules;
    37 | 
    38 | });
    39 | 
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/freemarker.ftl:
    --------------------------------------------------------------------------------
     1 | <#ftl encoding="utf-8" />
     2 | <#setting locale="en_US" />
     3 | <#import "library" as lib />
     4 | <#--
     5 |     FreeMarker comment
     6 |     ${abc} <#assign a=12 />
     7 | -->
     8 | 
     9 | 
    10 | 
    11 |     
    12 |         
    13 |         
    14 |         ${title!"FreeMarker"}<title>
    15 |     </head>
    16 |     
    17 |     <body>
    18 |     
    19 |         <h1>Hello ${name!""}</h1>
    20 |         
    21 |         <p>Today is: ${.now?date}</p>
    22 |         
    23 |         <#assign x = 13>
    24 |         <#if x > 12 && x lt 14>x equals 13: ${x}</#if>
    25 |         
    26 |         <ul>
    27 |             <#list items as item>
    28 |                 <li>${item_index}: ${item.name!?split("\n")[0]}</li>
    29 |             </#list>
    30 |         </ul>
    31 |         
    32 |         User directive: <@lib.function attr1=true attr2='value' attr3=-42.12>Test</@lib.function>
    33 |         <@anotherOne />
    34 |         
    35 |         <#if variable?exists>
    36 |             Deprecated
    37 |         <#elseif variable??>
    38 |             Better
    39 |         <#else>
    40 |             Default
    41 |         </#if>
    42 |         
    43 |         <img src="images/${user.id}.png" />
    44 |         
    45 |     </body>
    46 | </html>
    47 | 
    
    
    --------------------------------------------------------------------------------
    /tool/lib.js:
    --------------------------------------------------------------------------------
     1 | var plist = require("plist");
     2 | var util = require("util");
     3 | exports.parsePlist = function(themeXml, callback) {    
     4 |     var result = ""
     5 |     plist.parseString(themeXml, function(_, theme) {
     6 |         result = theme[0];
     7 |         callback && callback(theme[0]);
     8 |     });
     9 |     return result;
    10 | }
    11 | 
    12 | exports.formatJSON = function(object, initialIndent) {
    13 |     return util.inspect(object, false, 40).replace(/^/gm, initialIndent||"")
    14 |     
    15 | }
    16 | 
    17 | 
    18 | exports.fillTemplate = function(template, replacements) {
    19 |     return template.replace(/%(.+?)%/g, function(str, m) {
    20 |         return replacements[m] || "";
    21 |     });
    22 | }
    23 | 
    24 | exports.hyphenate = function(str) {
    25 |     return str.replace(/([A-Z])/g, "-$1").replace(/_/g, "-").toLowerCase();
    26 | }
    27 | 
    28 | exports.quoteString = function(str) {
    29 |     return '"' + str.replace(/\\/, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\\n") + '"';
    30 | }
    31 | 
    32 | 
    33 | exports.restoreJSONComments = function(objStr) {
    34 |     return objStr.replace(/^(\s*)comment: '(.*)'/gm, function(_, i, c) {
    35 |         return i + "//" +  c.replace(/\\n(\\t)*/g, "\n" + i + "//") + "\n" + i
    36 |     }).replace(/ \/\/ ERROR/g, '", // ERROR');
    37 | }
    38 | 
    39 | 
    
    
    --------------------------------------------------------------------------------
    /lib/ace/mode/_test/tokens_html.json:
    --------------------------------------------------------------------------------
     1 | [[
     2 |    "start",
     3 |   ["meta.tag","<"],
     4 |   ["meta.tag.tag-name","html"],
     5 |   ["meta.tag.r",">"]
     6 | ],[
     7 |    "start",
     8 |   ["meta.tag","<"],
     9 |   ["meta.tag.tag-name.script","script"],
    10 |   ["text"," "],
    11 |   ["entity.other.attribute-name","a"],
    12 |   ["keyword.operator","="],
    13 |   ["string","'a'"],
    14 |   ["meta.tag.r",">"],
    15 |   ["storage.type","var"],
    16 |   ["meta.tag","</"],
    17 |   ["meta.tag.tag-name.script","script"],
    18 |   ["meta.tag.r",">"],
    19 |   ["text","'123'"]
    20 | ],[
    21 |    "tag_qqstring",
    22 |   ["meta.tag","<"],
    23 |   ["meta.tag.tag-name.anchor","a"],
    24 |   ["text"," "],
    25 |   ["entity.other.attribute-name","href"],
    26 |   ["keyword.operator","="],
    27 |   ["string","\"abc"]
    28 | ],[
    29 |    "start",
    30 |   ["string","  def\""],
    31 |   ["meta.tag.r",">"]
    32 | ],[
    33 |    "tag_qstring",
    34 |   ["meta.tag","<"],
    35 |   ["meta.tag.tag-name.anchor","a"],
    36 |   ["text"," "],
    37 |   ["entity.other.attribute-name","href"],
    38 |   ["keyword.operator","="],
    39 |   ["string","'abc"]
    40 | ],[
    41 |    "start",
    42 |   ["string","def\\'"],
    43 |   ["meta.tag.r",">"]
    44 | ],[
    45 |    "start"
    46 | ],[
    47 |    "start",
    48 |   ["meta.tag","</"],
    49 |   ["meta.tag.tag-name","html"],
    50 |   ["meta.tag.r",">"]
    51 | ]]
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/dart.dart:
    --------------------------------------------------------------------------------
     1 | main() {
     2 |   print('Hello World!');
     3 | }
     4 | 
     5 | 
     6 | int fib(int n) => (n > 1) ? (fib(n - 1) + fib(n - 2)) : n;
     7 | main() {
     8 |   print('fib(20) = ${fib(20)}');
     9 | }
    10 | /*asd
    11 | asdad
    12 | */
    13 | 0.67
    14 | 77
    15 | .86
    16 | 
    17 | import("http://dartwatch.com/myOtherLibrary.dart");
    18 | import("myOtherLibrary.dart", prefix:"lib1");
    19 | 
    20 | """asdasdads
    21 | asdadsadsasd
    22 | asdasdasdad"""
    23 |  
    24 | '23424'
    25 | 
    26 | 0x234
    27 | 
    28 | foo is bar
    29 | 
    30 | int x = 4 << 10 
    31 | // Create a class for Point.
    32 | class Point {
    33 |  
    34 |   // Final variables cannot be changed once they are assigned.
    35 |   // Create two instance variables.
    36 |   final num x, y;
    37 |  
    38 |   // A constructor, with syntactic sugar for setting instance variables.
    39 |   Point(this.x, this.y);
    40 |  
    41 |   // A named constructor with an initializer list.
    42 |   Point.origin() : x = 0, y = 0;
    43 |  
    44 |   // A method.
    45 |   num distanceTo(Point other) {
    46 |     var dx = x - other.x;
    47 |     var dy = y - other.y;
    48 |     return sqrt(dx * dx + dy * dy);
    49 |   }
    50 | }
    51 |  
    52 |  // Check for null.
    53 | var unicorn;
    54 | assert(unicorn == null);
    55 | 
    56 | // Check for NaN.
    57 | var iMeantToDoThis = 0/0;
    58 | assert(iMeantToDoThis.isNaN());
    59 | 
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/groovy.groovy:
    --------------------------------------------------------------------------------
     1 | //http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy
     2 | 
     3 | class Employee {
     4 |     def name, salary
     5 |     boolean manager
     6 |     String toString() { return name }
     7 | }
     8 | 
     9 | def emps = [new Employee(name:'Guillaume', manager:true, salary:200),
    10 |     new Employee(name:'Graeme', manager:true, salary:200),
    11 |     new Employee(name:'Dierk', manager:false, salary:151),
    12 |     new Employee(name:'Bernd', manager:false, salary:50)]
    13 | 
    14 | def managers(emps) {
    15 |     emps.findAll { e -> e.isManager() }
    16 | }
    17 | 
    18 | assert emps[0..1] == managers(emps) // [Guillaume, Graeme]
    19 | 
    20 | def highPaid(emps) {
    21 |     threshold = 150
    22 |     emps.findAll { e -> e.salary > threshold }
    23 | }
    24 | 
    25 | assert emps[0..2] == highPaid(emps) // [Guillaume, Graeme, Dierk]
    26 | 
    27 | def paidMore(amount) {
    28 |     { e -> e.salary > amount}
    29 | }
    30 | def highPaid = paidMore(150)
    31 | 
    32 | assert highPaid(emps[0]) // true
    33 | assert emps[0..2] == emps.findAll(highPaid)
    34 | 
    35 | def filename = 'test.txt'
    36 | new File(filename).withReader{ reader -> doSomethingWith(reader) }
    37 | 
    38 | def readersText
    39 | def doSomethingWith(reader) { readersText = reader.text }
    40 | 
    41 | assert new File(filename).text == readersText
    
    
    --------------------------------------------------------------------------------
    /lib/ace/ext/menu_tools/settings_menu.css:
    --------------------------------------------------------------------------------
     1 | #ace_settingsmenu, #kbshortcutmenu {
     2 |     background-color: #F7F7F7;
     3 |     color: black;
     4 |     box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);
     5 |     padding: 1em 0.5em 2em 1em;
     6 |     overflow: auto;
     7 |     position: absolute;
     8 |     margin: 0;
     9 |     bottom: 0;
    10 |     right: 0;
    11 |     top: 0;
    12 |     z-index: 9991;
    13 |     cursor: default;
    14 | }
    15 | 
    16 | .ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {
    17 |     box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);
    18 |     background-color: rgba(255, 255, 255, 0.6);
    19 |     color: black;
    20 | }
    21 | 
    22 | .ace_optionsMenuEntry:hover {
    23 |     background-color: rgba(100, 100, 100, 0.1);
    24 |     -webkit-transition: all 0.5s;
    25 |     transition: all 0.3s
    26 | }
    27 | 
    28 | .ace_closeButton {
    29 |     background: rgba(245, 146, 146, 0.5);
    30 |     border: 1px solid #F48A8A;
    31 |     border-radius: 50%;
    32 |     padding: 7px;
    33 |     position: absolute;
    34 |     right: -8px;
    35 |     top: -8px;
    36 |     z-index: 1000;
    37 | }
    38 | .ace_closeButton{
    39 |     background: rgba(245, 146, 146, 0.9);
    40 | }
    41 | .ace_optionsMenuKey {
    42 |     color: darkslateblue;
    43 |     font-weight: bold;
    44 | }
    45 | .ace_optionsMenuCommand {
    46 |     color: darkcyan;
    47 |     font-weight: normal;
    48 | }
    
    
    --------------------------------------------------------------------------------
    /lib/ace/snippets/falcon.snippets:
    --------------------------------------------------------------------------------
     1 | snippet #!
     2 | 	#!/usr/bin/env falcon
     3 | 
     4 | # Import	
     5 | snippet imp
     6 | 	import ${1:module}
     7 | 
     8 | # Function
     9 | snippet fun
    10 | 	function ${2:function_name}(${3})	
    11 | 		${4:/* code */}
    12 | 	end	
    13 | 
    14 | # Class
    15 | snippet class
    16 | 	class ${1:class_name}(${2:class_params})
    17 | 		${3:/* members/methods */}
    18 | 	end
    19 | 
    20 | # If 
    21 | snippet if
    22 | 	if ${1:condition}
    23 | 		${2:/* code */}		
    24 | 	end
    25 | 
    26 | # If else
    27 | snippet ife
    28 | 	if ${1:condition}
    29 | 		${2:/* code */}		
    30 | 	else
    31 | 	    ${1}	
    32 | 	end
    33 | 
    34 | # If else if	
    35 | snippet elif
    36 | 	elif ${1:condition}
    37 | 		${2:/* code */}	        
    38 | 
    39 | # Switch case
    40 | snippet switch
    41 | 	switch ${1:expression}
    42 | 		case ${2:item}
    43 | 		case ${3:item}
    44 | 		default 
    45 | 	end
    46 | 
    47 | # Select
    48 | snippet select 
    49 | 	select ${1:variable}
    50 | 		case ${2:TypeSpec}
    51 | 		case ${3:TypeSpec}
    52 | 		default
    53 | 	end
    54 | 
    55 | # For/in Loop
    56 | snippet forin
    57 | 	for ${1:element} in ${2:container}
    58 | 		${3:/* code */}
    59 | 	end
    60 | 
    61 | # For/to Loop
    62 | snippet forto
    63 | 	for ${1:lowerbound} to ${2:upperbound}
    64 | 		${3:/* code */}
    65 | 	end
    66 | 
    67 | # While Loop
    68 | snippet while 
    69 | 	while ${1:conidition}
    70 | 		${2:/* code */}	
    71 | 	end
    72 | 
    
    
    --------------------------------------------------------------------------------
    /demo/static-highlighter/server.js:
    --------------------------------------------------------------------------------
     1 | /**
     2 |  * Simple node.js server, which generates the synax highlighted version of itself 
     3 |  * using the Ace modes and themes on the server and serving a static web page.
     4 |  */
     5 | 
     6 | // include ace search path and modules
     7 | require("amd-loader");
     8 | 
     9 | // load jsdom, which is required by Ace
    10 | require("../../lib/ace/test/mockdom");
    11 | 
    12 | var http = require("http");
    13 | var fs = require("fs");
    14 | 
    15 | // load the highlighter and the desired mode and theme
    16 | var highlighter = require("../../lib/ace/ext/static_highlight");
    17 | var JavaScriptMode = require("../../lib/ace/mode/javascript").Mode;
    18 | var theme = require("../../lib/ace/theme/twilight");
    19 | 
    20 | var port = process.env.PORT || 2222;
    21 | 
    22 | http.createServer(function(req, res) {
    23 |     res.writeHead(200, {"Content-Type": "text/html; charset=utf-8"});
    24 |     fs.readFile(__filename, "utf8", function(err, data) {
    25 |         var highlighted = highlighter.render(data, new JavaScriptMode(), theme);
    26 |         res.end('<html><body>\n\
    27 | <style type="text/css" media="screen">\n\
    28 |     :css:\n\
    29 | </style>\n\
    30 | :html:\n\
    31 | </body></html>'.replace(":css:", highlighted.css).replace(":html:", highlighted.html));
    32 |     });
    33 | }).listen(port);
    34 | 
    35 | console.log("Listening on port " + port);
    
    
    --------------------------------------------------------------------------------
    /demo/keyboard_shortcuts.html:
    --------------------------------------------------------------------------------
     1 | <!DOCTYPE html>
     2 | <html lang="en">
     3 | <head>
     4 |   <meta charset="UTF-8">
     5 |   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     6 |   <title>Editor
     7 |   
    20 | 
    21 | 
    22 | 
    23 | 
    
    24 |     
    25 | 
    26 | 
    43 | 
    44 | 
    45 | 
    46 | 
    47 | 
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/sh.sh:
    --------------------------------------------------------------------------------
     1 | #!/bin/sh
     2 | 
     3 | # Script to open a browser to current branch
     4 | # Repo formats:
     5 | # ssh   git@github.com:richoH/gh_pr.git
     6 | # http  https://richoH@github.com/richoH/gh_pr.git
     7 | # git   git://github.com/richoH/gh_pr.git
     8 | 
     9 | username=`git config --get github.user`
    10 | 
    11 | get_repo() {
    12 |     git remote -v | grep ${@:-$username} | while read remote; do
    13 |       if repo=`echo $remote | grep -E -o "git@github.com:[^ ]*"`; then
    14 |           echo $repo | sed -e "s/^git@github\.com://" -e "s/\.git$//"
    15 |           exit 1
    16 |       fi
    17 |       if repo=`echo $remote | grep -E -o "https?://([^@]*@)?github.com/[^ ]*\.git"`; then
    18 |           echo $repo | sed -e "s|^https?://||" -e "s/^.*github\.com\///" -e "s/\.git$//"
    19 |           exit 1
    20 |       fi
    21 |       if repo=`echo $remote | grep -E -o "git://github.com/[^ ]*\.git"`; then
    22 |           echo $repo | sed -e "s|^git://github.com/||" -e "s/\.git$//"
    23 |           exit 1
    24 |       fi
    25 |     done
    26 | 
    27 |     if [ $? -eq 0 ]; then
    28 |         echo "Couldn't find a valid remote" >&2
    29 |         exit 1
    30 |     fi
    31 | }
    32 | 
    33 | echo ${#x[@]}
    34 | 
    35 | if repo=`get_repo $@`; then
    36 |     branch=`git symbolic-ref HEAD 2>/dev/null`
    37 |     echo "http://github.com/$repo/pull/new/${branch##refs/heads/}"
    38 | else
    39 |     exit 1
    40 | fi
    41 | 
    
    
    --------------------------------------------------------------------------------
    /lib/ace/lib/net.js:
    --------------------------------------------------------------------------------
     1 | /*
     2 |  * based on code from:
     3 |  *
     4 |  * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
     5 |  * Available via the MIT or new BSD license.
     6 |  * see: http://github.com/jrburke/requirejs for details
     7 |  */
     8 | define(function(require, exports, module) {
     9 | "use strict";
    10 | var dom = require("./dom");
    11 | 
    12 | exports.get = function (url, callback) {
    13 |     var xhr = new XMLHttpRequest();
    14 |     xhr.open('GET', url, true);
    15 |     xhr.onreadystatechange = function () {
    16 |         //Do not explicitly handle errors, those should be
    17 |         //visible via console output in the browser.
    18 |         if (xhr.readyState === 4) {
    19 |             callback(xhr.responseText);
    20 |         }
    21 |     };
    22 |     xhr.send(null);
    23 | };
    24 | 
    25 | exports.loadScript = function(path, callback) {
    26 |     var head = dom.getDocumentHead();
    27 |     var s = document.createElement('script');
    28 | 
    29 |     s.src = path;
    30 |     head.appendChild(s);
    31 | 
    32 |     s.onload = s.onreadystatechange = function(_, isAbort) {
    33 |         if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
    34 |             s = s.onload = s.onreadystatechange = null;
    35 |             if (!isAbort)
    36 |                 callback();
    37 |         }
    38 |     };
    39 | };
    40 | 
    41 | });
    42 | 
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/jsp.jsp:
    --------------------------------------------------------------------------------
     1 | 
     2 | 
     3 |     
     8 |     
    13 | 
    14 |     

    15 | Today's date: <%= (new java.util.Date()).toLocaleString()%> 16 |

    17 | <%! int i = 0; %> 18 | 19 | int j = 10; 20 | 21 | 22 | <%-- This is JSP comment --%> 23 | <%@ directive attribute="value" %> 24 | 25 |

    Select Languages:

    26 | 27 |
    28 | Java
    29 | .NET
    30 | PHP
    31 | C/C++
    32 | PERL
    33 | 34 |
    35 | 36 | <% 37 | String select[] = request.getParameterValues("id"); 38 | if (select != null && select.length != 0) { 39 | out.println("You have selected: "); 40 | for (int i = 0; i < select.length; i++) { 41 | out.println(select[i]); 42 | } 43 | } 44 | %> 45 | 46 | -------------------------------------------------------------------------------- /api/resources/javascripts/plugins.js: -------------------------------------------------------------------------------- 1 | window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}}; 2 | (function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try 3 | {console.log();return window.console;}catch(err){return window.console={};}})()); 4 | 5 | /* 6 | * jQuery throttle / debounce - v1.1 - 3/7/2010 7 | * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 8 | * 9 | * Copyright (c) 2010 "Cowboy" Ben Alman 10 | * Dual licensed under the MIT and GPL licenses. 11 | * http://benalman.com/about/license/ 12 | */ 13 | (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); 14 | -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/actionscript.as: -------------------------------------------------------------------------------- 1 | package code 2 | { 3 | /***************************************** 4 | * based on textmate actionscript bundle 5 | ****************************************/ 6 | 7 | import fl.events.SliderEvent; 8 | 9 | public class Foo extends MovieClip 10 | { 11 | //************************* 12 | // Properties: 13 | 14 | public var activeSwatch:MovieClip; 15 | 16 | // Color offsets 17 | public var c1:Number = 0; // R 18 | 19 | //************************* 20 | // Constructor: 21 | 22 | public function Foo() 23 | { 24 | // Respond to mouse events 25 | swatch1_btn.addEventListener(MouseEvent.CLICK,swatchHandler,false,0,false); 26 | previewBox_btn.addEventListener(MouseEvent.MOUSE_DOWN,dragPressHandler); 27 | 28 | // Respond to drag events 29 | red_slider.addEventListener(SliderEvent.THUMB_DRAG,sliderHandler); 30 | 31 | // Draw a frame later 32 | addEventListener(Event.ENTER_FRAME,draw); 33 | } 34 | 35 | protected function clickHandler(event:MouseEvent):void 36 | { 37 | car.transform.colorTransform = new ColorTransform(0,0,0,1,c1,c2,c3); 38 | } 39 | 40 | protected function changeRGBHandler(event:Event):void 41 | { 42 | c1 = Number(c1_txt.text); 43 | 44 | if(!(c1>=0)){ 45 | c1 = 0; 46 | } 47 | 48 | updateSliders(); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /lib/ace/mode/luapage_highlight_rules.js: -------------------------------------------------------------------------------- 1 | // LuaPage implements the LuaPage markup as described by the Kepler Project's CGILua 2 | // documentation: http://keplerproject.github.com/cgilua/manual.html#templates 3 | define(function(require, exports, module) { 4 | "use strict"; 5 | 6 | var oop = require("../lib/oop"); 7 | var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; 8 | var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; 9 | 10 | var LuaPageHighlightRules = function() { 11 | this.$rules = new HtmlHighlightRules().getRules(); 12 | 13 | for (var i in this.$rules) { 14 | this.$rules[i].unshift({ 15 | token: "keyword", 16 | regex: "<\\%\\=?", 17 | next: "lua-start" 18 | }, { 19 | token: "keyword", 20 | regex: "<\\?lua\\=?", 21 | next: "lua-start" 22 | }); 23 | } 24 | this.embedRules(LuaHighlightRules, "lua-", [ 25 | { 26 | token: "keyword", 27 | regex: "\\%>", 28 | next: "start" 29 | }, 30 | { 31 | token: "keyword", 32 | regex: "\\?>", 33 | next: "start" 34 | } 35 | ]); 36 | }; 37 | 38 | oop.inherits(LuaPageHighlightRules, HtmlHighlightRules); 39 | 40 | exports.LuaPageHighlightRules = LuaPageHighlightRules; 41 | 42 | }); -------------------------------------------------------------------------------- /lib/ace/mode/rdoc.js: -------------------------------------------------------------------------------- 1 | /* 2 | * rdoc.js 3 | * 4 | * Copyright (C) 2009-11 by RStudio, Inc. 5 | * 6 | * This program is licensed to you under the terms of version 3 of the 7 | * GNU Affero General Public License. This program is distributed WITHOUT 8 | * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 9 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 10 | * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 11 | * 12 | */ 13 | define(function(require, exports, module) { 14 | "use strict"; 15 | 16 | var oop = require("../lib/oop"); 17 | var TextMode = require("./text").Mode; 18 | var Tokenizer = require("../tokenizer").Tokenizer; 19 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 20 | var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules; 21 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 22 | 23 | var Mode = function(suppressHighlighting) { 24 | this.$tokenizer = new Tokenizer(new RDocHighlightRules().getRules()); 25 | this.$outdent = new MatchingBraceOutdent(); 26 | }; 27 | oop.inherits(Mode, TextMode); 28 | 29 | (function() { 30 | this.getNextLineIndent = function(state, line, tab) { 31 | return this.$getIndent(line); 32 | }; 33 | }).call(Mode.prototype); 34 | 35 | exports.Mode = Mode; 36 | }); 37 | -------------------------------------------------------------------------------- /doc/template/resources/javascripts/plugins.js: -------------------------------------------------------------------------------- 1 | window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}}; 2 | (function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try 3 | {console.log();return window.console;}catch(err){return window.console={};}})()); 4 | 5 | /* 6 | * jQuery throttle / debounce - v1.1 - 3/7/2010 7 | * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 8 | * 9 | * Copyright (c) 2010 "Cowboy" Ben Alman 10 | * Dual licensed under the MIT and GPL licenses. 11 | * http://benalman.com/about/license/ 12 | */ 13 | (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); 14 | -------------------------------------------------------------------------------- /static.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var http = require("http") 4 | , path = require("path") 5 | , mime = require("mime") 6 | , url = require("url") 7 | , fs = require("fs") 8 | , port = process.env.PORT || 8888 9 | , ip = process.env.IP || "0.0.0.0"; 10 | 11 | // compatibility with node 0.6 12 | if (!fs.exists) 13 | fs.exists = path.exists; 14 | 15 | http.createServer(function(request, response) { 16 | 17 | var uri = url.parse(request.url).pathname 18 | , filename = path.join(process.cwd(), uri); 19 | 20 | fs.exists(filename, function(exists) { 21 | if(!exists) { 22 | response.writeHead(404, {"Content-Type": "text/plain"}); 23 | response.write("404 Not Found\n"); 24 | response.end(); 25 | return; 26 | } 27 | 28 | if (fs.statSync(filename).isDirectory()) filename += '/index.html'; 29 | 30 | fs.readFile(filename, "binary", function(err, file) { 31 | if(err) { 32 | response.writeHead(500, {"Content-Type": "text/plain"}); 33 | response.write(err + "\n"); 34 | response.end(); 35 | return; 36 | } 37 | 38 | var contentType = mime.lookup(filename) || "text/plain"; 39 | response.writeHead(200, {"Content-Type": contentType}); 40 | response.write(file, "binary"); 41 | response.end(); 42 | }); 43 | }); 44 | }).listen(port, ip); 45 | 46 | console.log("http://localhost:" + port); 47 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/tokens_curly.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["text","tokenize Curly template"], 4 | ["variable","{{"], 5 | ["text","test"], 6 | ["variable","}}"] 7 | ],[ 8 | "start", 9 | ["text","tokenize embedded script"] 10 | ],[ 11 | "start", 12 | ["meta.tag","<"], 13 | ["meta.tag.tag-name.script","script"], 14 | ["text"," "], 15 | ["entity.other.attribute-name","a"], 16 | ["keyword.operator","="], 17 | ["string","'a'"], 18 | ["meta.tag.r",">"], 19 | ["storage.type","var"], 20 | ["meta.tag",""], 23 | ["text","'123'"] 24 | ],[ 25 | "start", 26 | ["text","tokenize multiline attribute value with double quotes"] 27 | ],[ 28 | "tag_qqstring", 29 | ["meta.tag","<"], 30 | ["meta.tag.tag-name.anchor","a"], 31 | ["text"," "], 32 | ["entity.other.attribute-name","href"], 33 | ["keyword.operator","="], 34 | ["string","\"abc{{xyz}}"] 35 | ],[ 36 | "start", 37 | ["string","def\""], 38 | ["meta.tag.r",">"] 39 | ],[ 40 | "start", 41 | ["text","tokenize multiline attribute value with single quotes"] 42 | ],[ 43 | "tag_qstring", 44 | ["meta.tag","<"], 45 | ["meta.tag.tag-name.anchor","a"], 46 | ["text"," "], 47 | ["entity.other.attribute-name","href"], 48 | ["keyword.operator","="], 49 | ["string","'abc"] 50 | ],[ 51 | "start", 52 | ["string","def\\\"'"], 53 | ["meta.tag.r",">"] 54 | ],[ 55 | "start" 56 | ]] -------------------------------------------------------------------------------- /tool/theme.tmpl.css: -------------------------------------------------------------------------------- 1 | /* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: %uuid%) */ 2 | 3 | .%cssClass% .ace_gutter { 4 | background: #e8e8e8; 5 | color: #333; 6 | } 7 | 8 | .%cssClass% .ace_print-margin { 9 | width: 1px; 10 | background: %printMargin%; 11 | } 12 | 13 | .%cssClass% { 14 | background-color: %background%; 15 | color: %foreground%; 16 | } 17 | 18 | .%cssClass% .ace_cursor { 19 | border-left: 2px solid %cursor%; 20 | } 21 | 22 | .%cssClass% .ace_overwrite-cursors .ace_cursor { 23 | border-left: 0px; 24 | border-bottom: 1px solid %overwrite%; 25 | } 26 | 27 | .%cssClass% .ace_marker-layer .ace_selection { 28 | background: %selection%; 29 | } 30 | 31 | .%cssClass%.ace_multiselect .ace_selection.ace_start { 32 | box-shadow: 0 0 3px 0px %background%; 33 | border-radius: 2px; 34 | } 35 | 36 | .%cssClass% .ace_marker-layer .ace_step { 37 | background: %step%; 38 | } 39 | 40 | .%cssClass% .ace_marker-layer .ace_bracket { 41 | margin: -1px 0 0 -1px; 42 | border: 1px solid %bracket%; 43 | } 44 | 45 | .%cssClass% .ace_marker-layer .ace_active-line { 46 | background: %active_line%; 47 | } 48 | 49 | .%cssClass% .ace_gutter-active-line { 50 | background-color: %active_line%; 51 | } 52 | 53 | .%cssClass% .ace_marker-layer .ace_selected-word { 54 | %selected_word_highlight% 55 | } 56 | 57 | .%cssClass% .ace_fold { 58 | background-color: %fold%; 59 | border-color: %foreground%; 60 | } 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lib/ace/mode/_test/text_coffee.txt: -------------------------------------------------------------------------------- 1 | #test: tokenize keyword 2 | for (i 1..2) 3 | #test: tokenize regexp 4 | /"[a]/ 5 | #test: tokenize functions 6 | foo = ({args}) -> 7 | foo = ({a1, a2}) -> 8 | foo = ({@a1, a2}) -> 9 | foo : ({args}) -> 10 | foo = ({args}) -> 11 | foo = ({0abc}) -> 12 | foo = ({/abc}) => 13 | foo = ({abc/}) -> 14 | foo = ({#abc}) -> 15 | foo = ({abc#}) -> 16 | foo = ({)abc}) -> 17 | foo = ({abc)}) -> 18 | foo = ({a{bc}) -> 19 | foo = ({}) -> 20 | foo = ({ }) -> 21 | foo : ({}) -> 22 | foo = (args) -> 23 | foo = (arg1, arg2) -> 24 | foo = (arg1 = 1, arg2 = 'name') -> 25 | foo = (@arg1 = /abc/, arg2 = 'name') -> 26 | #test: tokenize function: invalid case: 27 | foo=(/args) -> 28 | foo = () -> 29 | foo = ( ) -> 30 | foo : ( ) -> 31 | window.foo = (args) -> 32 | foo = -> 33 | foo = -> 34 | foo : -> 35 | #test: tokenize callback function 36 | foo bar: 1, (args) -> 37 | foo = (1, 2 (x) -> 38 | #test: tokenize class 39 | class Foo 40 | class Foo extends Bar 41 | #test: tokenize illegal name property 42 | foo.static.function 43 | #!test tokenize string with interpolation 44 | a = "#{ 22 / 7 + {x: "#{a + b}"} + 2}" 45 | """heredoc 46 | """ 47 | do -> 48 | ### 49 | herecomment 50 | ### 51 | re = /regex/imgy.test /// 52 | heregex # comment 53 | ///imgy 54 | this isnt: `just 55 | JavaScript` 56 | undefined 57 | -------------------------------------------------------------------------------- /lib/ace/snippets/autoit.snippets: -------------------------------------------------------------------------------- 1 | snippet if 2 | If ${1:condition} Then 3 | ${2:; True code} 4 | EndIf 5 | snippet el 6 | Else 7 | ${1} 8 | snippet elif 9 | ElseIf ${1:condition} Then 10 | ${2:; True code} 11 | # If/Else block 12 | snippet ifel 13 | If ${1:condition} Then 14 | ${2:; True code} 15 | Else 16 | ${3:; Else code} 17 | EndIf 18 | # If/ElseIf/Else block 19 | snippet ifelif 20 | If ${1:condition 1} Then 21 | ${2:; True code} 22 | ElseIf ${3:condition 2} Then 23 | ${4:; True code} 24 | Else 25 | ${5:; Else code} 26 | EndIf 27 | # Switch block 28 | snippet switch 29 | Switch (${1:condition}) 30 | Case {$2:case1}: 31 | {$3:; Case 1 code} 32 | Case Else: 33 | {$4:; Else code} 34 | EndSwitch 35 | # Select block 36 | snippet select 37 | Select (${1:condition}) 38 | Case {$2:case1}: 39 | {$3:; Case 1 code} 40 | Case Else: 41 | {$4:; Else code} 42 | EndSelect 43 | # While loop 44 | snippet while 45 | While (${1:condition}) 46 | ${2:; code...} 47 | WEnd 48 | # For loop 49 | snippet for 50 | For ${1:n} = ${3:1} to ${2:count} 51 | ${4:; code...} 52 | Next 53 | # New Function 54 | snippet func 55 | Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): 56 | ${4:Return} 57 | EndFunc 58 | # Message box 59 | snippet msg 60 | MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) 61 | # Debug Message 62 | snippet debug 63 | MsgBox(0, "Debug", ${1:"Debug Message"}) 64 | # Show Variable Debug Message 65 | snippet showvar 66 | MsgBox(0, "${1:VarName}", $1) 67 | -------------------------------------------------------------------------------- /demo/static-highlighter/client.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Static Code highlighter using Ace 8 | 9 | 10 | 11 | 12 |

    Client Side Syntax Highlighting

    13 | 14 |

    Syntax highlighting using Ace language modes and themes.

    15 | 16 |
    17 | 18 | 26 | 27 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/modelist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ACE Editor Modelist Demo 7 | 21 | 22 | 23 | 24 |
    
    25 |     
    26 | 
    27 | 
    28 | 
    45 | 
    46 | 
    47 | 
    48 | 
    49 | 
    
    
    --------------------------------------------------------------------------------
    /lib/ace/snippets/dart.snippets:
    --------------------------------------------------------------------------------
     1 | snippet lib
     2 | 	#library('${1}');
     3 | 	${2}
     4 | snippet im
     5 | 	#import('${1}');
     6 | 	${2}
     7 | snippet so
     8 | 	#source('${1}');
     9 | 	${2}
    10 | snippet main
    11 | 	static void main() {
    12 | 	  ${1:/* code */}
    13 | 	}
    14 | snippet st
    15 | 	static ${1}
    16 | snippet fi
    17 | 	final ${1}
    18 | snippet re
    19 | 	return ${1}
    20 | snippet br
    21 | 	break;
    22 | snippet th
    23 | 	throw ${1}
    24 | snippet cl
    25 | 	class ${1:`Filename("", "untitled")`} ${2}
    26 | snippet in
    27 | 	interface ${1:`Filename("", "untitled")`} ${2}
    28 | snippet imp
    29 | 	implements ${1}
    30 | snippet ext
    31 | 	extends ${1}
    32 | snippet if
    33 | 	if (${1:true}) {
    34 | 	  ${2}
    35 | 	}
    36 | snippet ife
    37 | 	if (${1:true}) {
    38 | 	  ${2}
    39 | 	} else {
    40 | 	  ${3}
    41 | 	}
    42 | snippet el
    43 | 	else
    44 | snippet sw
    45 | 	switch (${1}) {
    46 | 	  ${2}
    47 | 	}
    48 | snippet cs
    49 | 	case ${1}:
    50 | 	  ${2}
    51 | snippet de
    52 | 	default:
    53 | 	  ${1}
    54 | snippet for
    55 | 	for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {
    56 | 	  ${4:$1[$2]}
    57 | 	}
    58 | snippet fore
    59 | 	for (final ${2:item} in ${1:itemList}) {
    60 | 	  ${3:/* code */}
    61 | 	}
    62 | snippet wh
    63 | 	while (${1:/* condition */}) {
    64 | 	  ${2:/* code */}
    65 | 	}
    66 | snippet dowh
    67 | 	do {
    68 | 	  ${2:/* code */}
    69 | 	} while (${1:/* condition */});
    70 | snippet as
    71 | 	assert(${1:/* condition */});
    72 | snippet try
    73 | 	try {
    74 | 	  ${2}
    75 | 	} catch (${1:Exception e}) {
    76 | 	}
    77 | snippet tryf
    78 | 	try {
    79 | 	  ${2}
    80 | 	} catch (${1:Exception e}) {
    81 | 	} finally {
    82 | 	}
    83 | 
    
    
    --------------------------------------------------------------------------------
    /LICENSE:
    --------------------------------------------------------------------------------
     1 | Copyright (c) 2010, Ajax.org B.V.
     2 | All rights reserved.
     3 | 
     4 | Redistribution and use in source and binary forms, with or without
     5 | modification, are permitted provided that the following conditions are met:
     6 |     * Redistributions of source code must retain the above copyright
     7 |       notice, this list of conditions and the following disclaimer.
     8 |     * Redistributions in binary form must reproduce the above copyright
     9 |       notice, this list of conditions and the following disclaimer in the
    10 |       documentation and/or other materials provided with the distribution.
    11 |     * Neither the name of Ajax.org B.V. nor the
    12 |       names of its contributors may be used to endorse or promote products
    13 |       derived from this software without specific prior written permission.
    14 | 
    15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    18 | DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
    19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    25 | 
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/json.json:
    --------------------------------------------------------------------------------
     1 | {
     2 |  "query": {
     3 |   "count": 10,
     4 |   "created": "2011-06-21T08:10:46Z",
     5 |   "lang": "en-US",
     6 |   "results": {
     7 |    "photo": [
     8 |     {
     9 |      "farm": "6",
    10 |      "id": "5855620975",
    11 |      "isfamily": "0",
    12 |      "isfriend": "0",
    13 |      "ispublic": "1",
    14 |      "owner": "32021554@N04",
    15 |      "secret": "f1f5e8515d",
    16 |      "server": "5110",
    17 |      "title": "7087 bandit cat"
    18 |     },
    19 |     {
    20 |      "farm": "4",
    21 |      "id": "5856170534",
    22 |      "isfamily": "0",
    23 |      "isfriend": "0",
    24 |      "ispublic": "1",
    25 |      "owner": "32021554@N04",
    26 |      "secret": "ff1efb2a6f",
    27 |      "server": "3217",
    28 |      "title": "6975 rusty cat"
    29 |     },
    30 |     {
    31 |      "farm": "6",
    32 |      "id": "5856172972",
    33 |      "isfamily": "0",
    34 |      "isfriend": "0",
    35 |      "ispublic": "1",
    36 |      "owner": "51249875@N03",
    37 |      "secret": "6c6887347c",
    38 |      "server": "5192",
    39 |      "title": "watermarked-cats"
    40 |     },
    41 |     {
    42 |      "farm": "6",
    43 |      "id": "5856168328",
    44 |      "isfamily": "0",
    45 |      "isfriend": "0",
    46 |      "ispublic": "1",
    47 |      "owner": "32021554@N04",
    48 |      "secret": "0c1cfdf64c",
    49 |      "server": "5078",
    50 |      "title": "7020 mandy cat"
    51 |     },
    52 |     {
    53 |      "farm": "3",
    54 |      "id": "5856171774",
    55 |      "isfamily": "0",
    56 |      "isfriend": "0",
    57 |      "ispublic": "1",
    58 |      "owner": "32021554@N04",
    59 |      "secret": "7f5a3180ab",
    60 |      "server": "2696",
    61 |      "title": "7448 bobby cat"
    62 |     }
    63 |    ]
    64 |   }
    65 |  }
    66 | }
    
    
    --------------------------------------------------------------------------------
    /demo/kitchen-sink/docs/pascal.pas:
    --------------------------------------------------------------------------------
     1 | (*****************************************************************************
     2 |  * A simple bubble sort program.  Reads integers, one per line, and prints   *
     3 |  * them out in sorted order.  Blows up if there are more than 49.            *
     4 |  *****************************************************************************)
     5 | PROGRAM Sort(input, output);
     6 |     CONST
     7 |         (* Max array size. *)
     8 |         MaxElts = 50;
     9 |     TYPE 
    10 |         (* Type of the element array. *)
    11 |         IntArrType = ARRAY [1..MaxElts] OF Integer;
    12 | 
    13 |     VAR
    14 |         (* Indexes, exchange temp, array size. *)
    15 |         i, j, tmp, size: integer;
    16 | 
    17 |         (* Array of ints *)
    18 |         arr: IntArrType;
    19 | 
    20 |     (* Read in the integers. *)
    21 |     PROCEDURE ReadArr(VAR size: Integer; VAR a: IntArrType); 
    22 |         BEGIN
    23 |             size := 1;
    24 |             WHILE NOT eof DO BEGIN
    25 |                 readln(a[size]);
    26 |                 IF NOT eof THEN 
    27 |                     size := size + 1
    28 |             END
    29 |         END;
    30 | 
    31 |     BEGIN
    32 |         (* Read *)
    33 |         ReadArr(size, arr);
    34 | 
    35 |         (* Sort using bubble sort. *)
    36 |         FOR i := size - 1 DOWNTO 1 DO
    37 |             FOR j := 1 TO i DO 
    38 |                 IF arr[j] > arr[j + 1] THEN BEGIN
    39 |                     tmp := arr[j];
    40 |                     arr[j] := arr[j + 1];
    41 |                     arr[j + 1] := tmp;
    42 |                 END;
    43 | 
    44 |         (* Print. *)
    45 |         FOR i := 1 TO size DO
    46 |             writeln(arr[i])
    47 |     END.
    48 |             
    
    
    --------------------------------------------------------------------------------
    /demo/statusbar.html:
    --------------------------------------------------------------------------------
     1 | 
     2 | 
     3 | 
     4 |   
     5 |   
     6 |   ACE Editor StatusBar Demo
     7 |   
    38 | 
    39 | 
    40 | 
    41 | 
    
    42 | 
    ace rocks!
    43 | 44 | 45 | 46 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /lib/ace/theme/chaos.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright 2011 Irakli Gozalishvili. All rights reserved. 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to 7 | * deal in the Software without restriction, including without limitation the 8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | * sell copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * ***** END LICENSE BLOCK ***** */ 23 | 24 | define(function(require, exports, module) { 25 | 26 | exports.isDark = true; 27 | exports.cssClass = "ace-chaos"; 28 | exports.cssText = require("../requirejs/text!./chaos.css"); 29 | 30 | var dom = require("../lib/dom"); 31 | dom.importCssString(exports.cssText, exports.cssClass); 32 | 33 | }); -------------------------------------------------------------------------------- /lib/ace/mode/lucene_highlight_rules.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var lang = require("../lib/lang"); 6 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 7 | 8 | var LuceneHighlightRules = function() { 9 | this.$rules = { 10 | "start" : [ 11 | { 12 | token : "constant.character.negation", 13 | regex : "[\\-]" 14 | }, { 15 | token : "constant.character.interro", 16 | regex : "[\\?]" 17 | }, { 18 | token : "constant.character.asterisk", 19 | regex : "[\\*]" 20 | }, { 21 | token: 'constant.character.proximity', 22 | regex: '~[0-9]+\\b' 23 | }, { 24 | token : 'keyword.operator', 25 | regex: '(?:AND|OR|NOT)\\b' 26 | }, { 27 | token : "paren.lparen", 28 | regex : "[\\(]" 29 | }, { 30 | token : "paren.rparen", 31 | regex : "[\\)]" 32 | }, { 33 | token : "keyword", 34 | regex : "[\\S]+:" 35 | }, { 36 | token : "string", // " string 37 | regex : '".*?"' 38 | }, { 39 | token : "text", 40 | regex : "\\s+" 41 | } 42 | ] 43 | }; 44 | }; 45 | 46 | oop.inherits(LuceneHighlightRules, TextHighlightRules); 47 | 48 | exports.LuceneHighlightRules = LuceneHighlightRules; 49 | }); 50 | -------------------------------------------------------------------------------- /lib/ace/theme/ambiance.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright 2011 Irakli Gozalishvili. All rights reserved. 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to 7 | * deal in the Software without restriction, including without limitation the 8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | * sell copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * ***** END LICENSE BLOCK ***** */ 23 | 24 | define(function(require, exports, module) { 25 | 26 | exports.isDark = true; 27 | exports.cssClass = "ace-ambiance"; 28 | exports.cssText = require("../requirejs/text!./ambiance.css"); 29 | 30 | var dom = require("../lib/dom"); 31 | dom.importCssString(exports.cssText, exports.cssClass); 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /lib/ace/ext/statusbar.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | /** simple statusbar **/ 4 | var dom = require("ace/lib/dom"); 5 | var lang = require("ace/lib/lang"); 6 | 7 | var StatusBar = function(editor, parentNode) { 8 | this.element = dom.createElement("div"); 9 | this.element.className = "ace_status-indicator"; 10 | this.element.style.cssText = "display: inline-block;"; 11 | parentNode.appendChild(this.element); 12 | 13 | var statusUpdate = lang.delayedCall(function(){ 14 | this.updateStatus(editor) 15 | }.bind(this)); 16 | editor.on("changeStatus", function() { 17 | statusUpdate.schedule(100); 18 | }); 19 | editor.on("changeSelection", function() { 20 | statusUpdate.schedule(100); 21 | }); 22 | }; 23 | 24 | (function(){ 25 | this.updateStatus = function(editor) { 26 | var status = []; 27 | function add(str, separator) { 28 | str && status.push(str, separator || "|"); 29 | } 30 | 31 | if (editor.$vimModeHandler) 32 | add(editor.$vimModeHandler.getStatusText()); 33 | else if (editor.commands.recording) 34 | add("REC"); 35 | 36 | var c = editor.selection.lead; 37 | add(c.row + ":" + c.column, " "); 38 | if (!editor.selection.isEmpty()) { 39 | var r = editor.getSelectionRange(); 40 | add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")"); 41 | } 42 | status.pop(); 43 | this.element.textContent = status.join(""); 44 | }; 45 | }).call(StatusBar.prototype); 46 | 47 | exports.StatusBar = StatusBar; 48 | 49 | }); -------------------------------------------------------------------------------- /demo/kitchen-sink/docs/mushcode.mc: -------------------------------------------------------------------------------- 1 | @create phone 2 | &pickup phone=$pick up:@ifelse [u(is,u(mode),ICC)]={@pemit %#=You pick up the [fullname(me)].[set(me,PHONER:%#)][set(me,MODE:CIP)][set([u(INCOMING)],CONNECTED:[num(me)])][set(me,CONNECTED:[u(INCOMING)])]%r[showpicture(PICPICKUP)]%rUse '[color(green,black,psay )]' (or '[color(green,black,p )]') to talk into the phone.;@oemit %#=%N picks up the [fullname(me)].},{@pemit %#=You pick up the phone but no one is there. You hear a dialtone and then hang up. [play(u(DIALTONE))];@oemit %#=%N picks up the phone, but no one is on the other end.} 3 | &ringfun phone=[ifelse(eq(comp([u(%0/ringtone)],off),0),[color(black,cyan,INCOMING CALL FROM %1)],[play([switch([u(%0/ringtone)],1,[u(%0/ringtone1)],2,[u(%0/ringtone2)],3,[u(%0/ringtone3)],4,[u(%0/ringtone4)],5,[u(%0/ringtone5)],6,[u(%0/ringtone6)],7,[u(%0/ringtone7)],8,[u(%0/ringtone8)],9,[u(%0/ringtone9)],custom,[u(%0/customtone)],vibrate,[u(%0/vibrate)])])] 4 | &ringloop phone=@switch [u(ringstate)]=1,{@emit [setq(q,[u(connecting)])][set(%qq,rangs:0)][set(%qq,mode:WFC)][set(%qq,INCOMING:)];@ifelse [u(%qq/HASVMB)]={@tr me/ROUTEVMB=[u(connecting)];},{@pemit %#=[u(MSGCNC)];}},2,{@pemit %#=The call is connected.[setq(q,[u(CONNECTING)])][set(me,CONNECTED:%qq)][set(%qq,CONNECTED:[num(me)])][set(%qq,MODE:CIP)];@tr me/ciploop;@tr %qq/ciploop;},3,{@emit On [fullname(me)]'s earpiece you hear a ringing sound.[play(u(LINETONE))];@tr me/ringhere;@increment [u(connecting)]/RANGS;@wait 5={@tr me/ringloop};},4,{} 5 | &ringstate phone=[setq(q,u(connecting))][setq(1,[gt(u(%qq/rangs),sub(u(%qq/rings),1))])][setq(2,[and(u(is,u(%qq/MODE),CIP),u(is,u(%qq/INCOMING),[num(me)]))][setq(3,[u(is,u(%qq/MODE),ICC)])][ifelse(%q1,1,ifelse(%q2,2,ifelse(%q3,3,4)))] 6 | ;comment 7 | @@(comment) 8 | say [time()] 9 | -------------------------------------------------------------------------------- /lib/ace/mode/tex.js: -------------------------------------------------------------------------------- 1 | /* 2 | * tex.js 3 | * 4 | * Copyright (C) 2009-11 by RStudio, Inc. 5 | * 6 | * The Initial Developer of the Original Code is 7 | * Ajax.org B.V. 8 | * Portions created by the Initial Developer are Copyright (C) 2010 9 | * the Initial Developer. All Rights Reserved. 10 | * 11 | * This program is licensed to you under the terms of version 3 of the 12 | * GNU Affero General Public License. This program is distributed WITHOUT 13 | * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 15 | * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 16 | * 17 | */ 18 | define(function(require, exports, module) { 19 | "use strict"; 20 | 21 | var oop = require("../lib/oop"); 22 | var TextMode = require("./text").Mode; 23 | var Tokenizer = require("../tokenizer").Tokenizer; 24 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 25 | var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; 26 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 27 | 28 | var Mode = function(suppressHighlighting) { 29 | if (suppressHighlighting) 30 | this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules()); 31 | else 32 | this.$tokenizer = new Tokenizer(new TexHighlightRules().getRules()); 33 | this.$outdent = new MatchingBraceOutdent(); 34 | }; 35 | oop.inherits(Mode, TextMode); 36 | 37 | (function() { 38 | this.getNextLineIndent = function(state, line, tab) { 39 | return this.$getIndent(line); 40 | }; 41 | 42 | this.allowAutoInsert = function() { 43 | return false; 44 | }; 45 | }).call(Mode.prototype); 46 | 47 | exports.Mode = Mode; 48 | }); 49 | -------------------------------------------------------------------------------- /lib/ace/test/asyncjs/utils.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * async.js 3 | * Copyright(c) 2010 Fabian Jakobs 4 | * MIT Licensed 5 | */ 6 | 7 | define(function(require, exports, module) { 8 | 9 | var async = require("asyncjs/async") 10 | 11 | async.plugin({ 12 | delay: function(delay) { 13 | return this.each(function(item, next) { 14 | setTimeout(function() { 15 | next(); 16 | }, delay) 17 | }) 18 | }, 19 | 20 | timeout: function(timeout) { 21 | timeout = timeout || 0 22 | var source = this.source 23 | 24 | this.next = function(callback) { 25 | var called 26 | var id = setTimeout(function() { 27 | called = true 28 | callback("Source did not respond after " + timeout + "ms!") 29 | }, timeout) 30 | 31 | source.next(function(err, value) { 32 | if (called) 33 | return 34 | 35 | called = true 36 | clearTimeout(id) 37 | 38 | callback(err, value) 39 | }) 40 | } 41 | return new this.constructor(this) 42 | }, 43 | 44 | get: function(key) { 45 | return this.map(function(value, next) { 46 | next(null, value[key]) 47 | }) 48 | }, 49 | 50 | inspect: function() { 51 | return this.each(function(item, next) { 52 | console.log(JSON.stringify(item)) 53 | next() 54 | }) 55 | }, 56 | 57 | print: function() { 58 | return this.each(function(item, next) { 59 | console.log(item) 60 | next() 61 | }) 62 | } 63 | }) 64 | 65 | }) 66 | --------------------------------------------------------------------------------