From 0c99e826e9fec054b4b941f8a22014b42e6647f4 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Mon, 4 Feb 2013 17:09:07 -0800 Subject: [PATCH] Update dem tests --- lib/ace/mode/_test/tokens_c_cpp.json | 19 + lib/ace/mode/_test/tokens_coffee.json | 7 +- lib/ace/mode/_test/tokens_curly.json | 122 +--- lib/ace/mode/_test/tokens_html.json | 112 +--- lib/ace/mode/_test/tokens_javascript.json | 192 ++++++ lib/ace/mode/_test/tokens_lucene.json | 99 ++- lib/ace/mode/_test/tokens_markdown.json | 718 ++-------------------- lib/ace/mode/_test/tokens_ruby.json | 251 ++++---- lib/ace/mode/_test/tokens_sh.json | 100 ++- lib/ace/mode/_test/tokens_xml.json | 550 +---------------- 10 files changed, 639 insertions(+), 1531 deletions(-) diff --git a/lib/ace/mode/_test/tokens_c_cpp.json b/lib/ace/mode/_test/tokens_c_cpp.json index 6ddda060..2818526f 100644 --- a/lib/ace/mode/_test/tokens_c_cpp.json +++ b/lib/ace/mode/_test/tokens_c_cpp.json @@ -52,6 +52,25 @@ ["constant.other"," \"boost/asio/io_service.hpp\""] ],[ "start" +],[ + "directive", + ["keyword","#include"], + ["constant.other.multiline"," \\"] +],[ + "directive", + ["constant.other.multiline"," \\"] +],[ + "directive", + ["constant.other.multiline"," \"iostream\" \\"] +],[ + "directive", + ["constant.other.multiline"," \"string\" \\"] +],[ + "start", + ["constant.other"," "] +],[ + "start", + ["text"," "] ],[ "start", ["keyword.control","using"], diff --git a/lib/ace/mode/_test/tokens_coffee.json b/lib/ace/mode/_test/tokens_coffee.json index 5d9d8645..a4a90e7b 100644 --- a/lib/ace/mode/_test/tokens_coffee.json +++ b/lib/ace/mode/_test/tokens_coffee.json @@ -466,14 +466,17 @@ "start", ["string.regex"," ///imgy"] ],[ - "start", + "js", ["text"," "], ["keyword","this"], ["text"," "], ["keyword","isnt"], ["punctuation.operator",":"], ["text"," "], - ["string","`just JavaScript`"] + ["string","`just "] +],[ + "start", + ["string"," JavaScript`"] ],[ "start", ["text"," "], diff --git a/lib/ace/mode/_test/tokens_curly.json b/lib/ace/mode/_test/tokens_curly.json index 6d086717..b43f9087 100644 --- a/lib/ace/mode/_test/tokens_curly.json +++ b/lib/ace/mode/_test/tokens_curly.json @@ -1,106 +1,52 @@ [[ "start", - ["meta.tag","<"], - ["meta.tag.tag-name","html"], - ["meta.tag.r",">"] + ["text","tokenize Curly template{{test}}"] ],[ "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","head"], - ["meta.tag.r",">"] + ["text","tokenize embedded script"] ],[ - "start" -],[ - "css-start", - ["text"," "], + "start", ["meta.tag","<"], - ["meta.tag.tag-name.style","style"], + ["meta.tag.tag-name.script","script"], ["text"," "], - ["entity.other.attribute-name","type"], + ["entity.other.attribute-name","a"], ["keyword.operator","="], - ["string","\"text/css\""], - ["meta.tag.r",">"] -],[ - "css-ruleset", - ["text"," "], - ["variable",".text-layer"], - ["text"," "], - ["paren.lparen","{"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","font-family"], - ["text",": Monaco, "], - ["string","\"Courier New\""], - ["text",", "], - ["support.constant.fonts","monospace"], - ["text",";"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","font-size"], - ["text",": "], - ["constant.numeric","12"], - ["keyword","px"], - ["text",";"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","cursor"], - ["text",": "], - ["support.constant","text"], - ["text",";"] -],[ - "css-start", - ["text"," "], - ["paren.rparen","}"] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "start" -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","body"], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","h1"], - ["text"," "], - ["entity.other.attribute-name","style"], - ["keyword.operator","="], - ["string","\"color:red\""], + ["string","'a'"], ["meta.tag.r",">"], - ["variable","{{"], - ["text","author_name"], - ["variable","}}"], + ["storage.type","var"], ["meta.tag",""], + ["text","'123'"] +],[ + "start", + ["text","tokenize multiline attribute value with double quotes"] +],[ + "tag_qqstring", + ["meta.tag","<"], + ["meta.tag.tag-name.anchor","a"], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["string","\"abc{{xyz}}"] +],[ + "start", + ["string","def\""], ["meta.tag.r",">"] ],[ "start", - ["text"," "], - ["meta.tag",""] + ["text","tokenize multiline attribute value with single quotes"] +],[ + "tag_qstring", + ["meta.tag","<"], + ["meta.tag.tag-name.anchor","a"], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["string","'abc"] ],[ "start", - ["meta.tag",""] ],[ "start" diff --git a/lib/ace/mode/_test/tokens_html.json b/lib/ace/mode/_test/tokens_html.json index df77b5d3..726c704f 100644 --- a/lib/ace/mode/_test/tokens_html.json +++ b/lib/ace/mode/_test/tokens_html.json @@ -5,96 +5,44 @@ ["meta.tag.r",">"] ],[ "start", - ["text"," "], ["meta.tag","<"], - ["meta.tag.tag-name","head"], - ["meta.tag.r",">"] -],[ - "start" -],[ - "css-start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name.style","style"], + ["meta.tag.tag-name.script","script"], ["text"," "], - ["entity.other.attribute-name","type"], + ["entity.other.attribute-name","a"], ["keyword.operator","="], - ["string","\"text/css\""], - ["meta.tag.r",">"] -],[ - "css-ruleset", - ["text"," "], - ["variable",".text-layer"], - ["text"," "], - ["paren.lparen","{"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","font-family"], - ["text",": Monaco, "], - ["string","\"Courier New\""], - ["text",", "], - ["support.constant.fonts","monospace"], - ["text",";"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","font-size"], - ["text",": "], - ["constant.numeric","12"], - ["keyword","px"], - ["text",";"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","cursor"], - ["text",": "], - ["support.constant","text"], - ["text",";"] -],[ - "css-start", - ["text"," "], - ["paren.rparen","}"] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "start" -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","body"], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","h1"], - ["text"," "], - ["entity.other.attribute-name","style"], - ["keyword.operator","="], - ["string","\"color:red\""], + ["string","'a'"], ["meta.tag.r",">"], - ["text","Juhu Kinners"], + ["storage.type","var"], ["meta.tag",""] + ["meta.tag.tag-name.script","script"], + ["meta.tag.r",">"], + ["text","'123'"] +],[ + "tag_qqstring", + ["meta.tag","<"], + ["meta.tag.tag-name.anchor","a"], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["string","\"abc"] ],[ "start", - ["text"," "], - ["meta.tag",""] +],[ + "tag_qstring", + ["meta.tag","<"], + ["meta.tag.tag-name.anchor","a"], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["string","'abc"] +],[ + "start", + ["string","def\\'"], + ["meta.tag.r",">"] +],[ + "start" ],[ "start", ["meta.tag",""], - ["text","some text"], - ["meta.tag",""] -],[ - "html-start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name.script","script"], - ["text"," "], - ["entity.other.attribute-name","src"], - ["keyword.operator","="], - ["string","\"src/ace.js\""], - ["text"," "], - ["entity.other.attribute-name","type"], - ["keyword.operator","="], - ["string","\"text/javascript\""], - ["text"," "], - ["entity.other.attribute-name","charset"], - ["keyword.operator","="], - ["string","\"utf-8\""], - ["meta.tag.r",">"], - ["meta.tag",""] -],[ - "html-js-start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name.script","script"], - ["meta.tag.r",">"] -],[ - "html-js-regex_allowed", - ["text"," "], - ["storage.type","window"], - ["punctuation.operator","."], - ["entity.name.function","onload"], - ["text"," "], - ["keyword.operator","="], - ["text"," "], - ["storage.type","function"], - ["paren.lparen","("], - ["paren.rparen",")"], - ["text"," "], - ["paren.lparen","{"] -],[ - "html-js-regex_allowed", - ["text"," "], - ["storage.type","var"], - ["text"," "], - ["identifier","editor"], - ["text"," "], - ["keyword.operator","="], - ["text"," "], - ["identifier","ace"], - ["punctuation.operator","."], - ["identifier","edit"], - ["paren.lparen","("], - ["string","\"editor\""], - ["paren.rparen",")"], - ["punctuation.operator",";"] -],[ - "html-js-regex_allowed", - ["text"," "], - ["paren.rparen","}"], - ["punctuation.operator",";"] -],[ - "html-start", - ["text"," "], - ["meta.tag",""] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","With \"editor\" being the id of the DOM element, which should be converted to an editor. Note that this element must be explicitly sized and positioned "], - ["support.function","`absolute`"], - ["text"," or "], - ["support.function","`relative`"], - ["text"," for Ace to work. e.g."] -],[ - "start" -],[ - "css-start", - ["support.function","```css"] -],[ - "css-ruleset", - ["text"," "], - ["keyword","#editor"], - ["text"," "], - ["paren.lparen","{"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","position"], - ["text",": "], - ["support.constant","absolute"], - ["text",";"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","width"], - ["text",": "], - ["constant.numeric","500"], - ["keyword","px"], - ["text",";"] -],[ - "css-ruleset", - ["text"," "], - ["support.type","height"], - ["text",": "], - ["constant.numeric","400"], - ["keyword","px"], - ["text",";"] -],[ - "css-start", - ["text"," "], - ["paren.rparen","}"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","To change the theme simply include the Theme's JavaScript file"] -],[ - "start" -],[ - "html-start", - ["support.function","```html"] -],[ - "html-start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name.script","script"], - ["text"," "], - ["entity.other.attribute-name","src"], - ["keyword.operator","="], - ["string","\"src/theme-twilight.js\""], - ["text"," "], - ["entity.other.attribute-name","type"], - ["keyword.operator","="], - ["string","\"text/javascript\""], - ["text"," "], - ["entity.other.attribute-name","charset"], - ["keyword.operator","="], - ["string","\"utf-8\""], - ["meta.tag.r",">"], - ["meta.tag",""] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","and configure the editor to use the theme:"] -],[ - "start" -],[ - "js-start", - ["support.function","```javascript"] -],[ - "js-regex_allowed", - ["text"," "], - ["identifier","editor"], - ["punctuation.operator","."], - ["identifier","setTheme"], - ["paren.lparen","("], - ["string","\"ace/theme/twilight\""], - ["paren.rparen",")"], - ["punctuation.operator",";"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","By default the editor only supports plain text mode; many other languages are available as separate modules. After including the mode's JavaScript file:"] -],[ - "start" -],[ - "html-start", - ["support.function","```html"] -],[ - "html-start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name.script","script"], - ["text"," "], - ["entity.other.attribute-name","src"], - ["keyword.operator","="], - ["string","\"src/mode-javascript.js\""], - ["text"," "], - ["entity.other.attribute-name","type"], - ["keyword.operator","="], - ["string","\"text/javascript\""], - ["text"," "], - ["entity.other.attribute-name","charset"], - ["keyword.operator","="], - ["string","\"utf-8\""], - ["meta.tag.r",">"], - ["meta.tag",""] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","Then the mode can be used like this:"] -],[ - "start" -],[ - "js-start", - ["support.function","```javascript"] -],[ - "js-regex_allowed", - ["text"," "], - ["storage.type","var"], - ["text"," "], - ["identifier","JavaScriptMode"], - ["text"," "], - ["keyword.operator","="], - ["text"," "], - ["identifier","require"], - ["paren.lparen","("], - ["string","\"ace/mode/javascript\""], - ["paren.rparen",")"], - ["punctuation.operator","."], - ["identifier","Mode"], - ["punctuation.operator",";"] -],[ - "js-regex_allowed", - ["text"," "], - ["identifier","editor"], - ["punctuation.operator","."], - ["identifier","getSession"], - ["paren.lparen","("], - ["paren.rparen",")"], - ["punctuation.operator","."], - ["identifier","setMode"], - ["paren.lparen","("], - ["keyword","new"], - ["text"," "], - ["identifier","JavaScriptMode"], - ["paren.lparen","("], - ["paren.rparen","))"], - ["punctuation.operator",";"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","Documentation"] -],[ - "start", - ["markup.heading.2","-------------"] -],[ - "start" -],[ - "start", - ["text","You find a lot more sample code in the ["], - ["string","demo app"], - ["text","]("], - ["markup.underline","https://github.com/ajaxorg/ace/blob/master/demo/demo.js"], - ["text",")."] -],[ - "start" -],[ - "start", - ["text","There is also some documentation on the ["], - ["string","wiki page"], - ["text","]("], - ["markup.underline","https://github.com/ajaxorg/ace/wiki"], - ["text",")."] -],[ - "start" -],[ - "start", - ["text","If you still need help, feel free to drop a mail on the ["], - ["string","ace mailing list"], - ["text","]("], - ["markup.underline","http://groups.google.com/group/ace-discuss"], - ["text",")."] -],[ - "start" -],[ - "start", - ["text","Running Ace"] -],[ - "start", - ["markup.heading.2","-----------"] -],[ - "start" -],[ - "start", - ["text","After the checkout Ace works out of the box. No build step is required. Open 'editor.html' in any browser except Google Chrome. Google Chrome doesn't allow XMLHTTPRequests from files loaded from disc (i.e. with a file:/// URL). To open Ace in Chrome simply start the bundled mini HTTP server:"] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," ./static.py"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","Or using Node.JS"] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," ./static.js"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","The editor can then be opened at http://localhost:8888/index.html."] -],[ - "start" -],[ - "start", - ["text","Package Ace"] -],[ - "start", - ["markup.heading.2","-----------"] -],[ - "start" -],[ - "start", - ["text","To package Ace we use the dryice build tool developed by the Mozilla Skywriter team. Before you can build you need to make sure that the submodules are up to date."] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," git submodule update --init --recursive"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","Afterwards Ace can be built by calling"] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," ./Makefile.dryice.js normal"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","The packaged Ace will be put in the 'build' folder."] -],[ - "start" -],[ - "start", - ["text","To build the bookmarklet version execute"] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," ./Makefile.dryice.js bm"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","Running the Unit Tests"] -],[ - "start", - ["markup.heading.2","----------------------"] -],[ - "start" -],[ - "start", - ["text","The Ace unit tests run on node.js. Before the first run a couple of node modules have to be installed. The easiest way to do this is by using the node package manager (npm). In the Ace base directory simply call"] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," npm link ."] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","To run the tests call:"] -],[ - "start" -],[ - "githubblock", - ["support.function","```bash"] -],[ - "githubblock", - ["support.function"," node lib/ace/test/all.js"] -],[ - "start", - ["support.function","```"] -],[ - "start" -],[ - "start", - ["text","You can also run the tests in your browser by serving:"] -],[ - "start" -],[ - "start", - ["support.function"," http://localhost:8888/lib/ace/test/tests.html"] -],[ - "start" -],[ - "start", - ["text","This makes debugging failing tests way more easier."] -],[ - "start" -],[ - "start", - ["text","Contributing"] -],[ - "start", - ["markup.heading.2","------------"] -],[ - "start" -],[ - "start", - ["text","Ace wouldn't be what it is without contributions! Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once. There are two versions of the agreement:"] -],[ - "start" -],[ - "listblock", - ["markup.list","1. [The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting."] -],[ - "listblock", - ["markup.list","2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects"] -],[ - "start" -],[ - "start", - ["text","If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email."] -],[ - "start" -],[ - "start", - ["text","Email: fabian.jakobs@web.de"] -],[ - "start" -],[ - "start", - ["text","Fax: +31 (0) 206388953"] -],[ - "start" -],[ - "start", - ["text","Address: Ajax.org B.V."] -],[ - "start", - ["text"," Keizersgracht 241"] -],[ - "start", - ["text"," 1016 EA, Amsterdam"] -],[ - "start", - ["text"," the Netherlands"] ]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_ruby.json b/lib/ace/mode/_test/tokens_ruby.json index 5f4b9d16..f1d80f46 100644 --- a/lib/ace/mode/_test/tokens_ruby.json +++ b/lib/ace/mode/_test/tokens_ruby.json @@ -1,154 +1,135 @@ [[ "start", - ["comment","#!/usr/bin/ruby"] -],[ - "start" -],[ - "start", - ["comment","# Program to find the factorial of a number"] -],[ - "start", - ["keyword","def"], ["text"," "], - ["identifier","fact"], - ["paren.lparen","("], - ["identifier","n"], - ["paren.rparen",")"] -],[ - "start", - ["text"," "], - ["keyword","if"], - ["text"," "], - ["identifier","n"], - ["text"," "], - ["keyword.operator","=="], - ["text"," "], - ["constant.numeric","0"] -],[ - "start", - ["text"," "], - ["constant.numeric","1"] -],[ - "start", - ["text"," "], - ["keyword","else"] -],[ - "start", - ["text"," "], - ["identifier","n"], - ["text"," "], - ["keyword.operator","*"], - ["text"," "], - ["identifier","fact"], - ["paren.lparen","("], - ["identifier","n"], - ["constant.numeric","-1"], - ["paren.rparen",")"] -],[ - "start", - ["text"," "], - ["keyword","end"] -],[ - "start", - ["keyword","end"] -],[ - "start" -],[ - "start", - ["support.function","puts"], - ["text"," "], - ["identifier","fact"], - ["paren.lparen","("], - ["support.class","ARGV"], - ["paren.lparen","["], - ["constant.numeric","0"], - ["paren.rparen","]"], - ["text","."], - ["identifier","to_i"], - ["paren.rparen",")"] -],[ - "start" -],[ - "start", - ["keyword","class"], - ["text"," "], - ["support.class","Range"] + ["comment","#test: symbol tokenizer"] ],[ "start", ["text"," "], - ["keyword","def"], - ["text"," "], - ["identifier","to_json"], - ["paren.lparen","("], - ["keyword.operator","*"], - ["identifier","a"], - ["paren.rparen",")"] + ["paren.lparen","["], + ["constant.other.symbol.ruby",":@thing"], + ["text",", "], + ["constant.other.symbol.ruby",":$thing"], + ["text",", "], + ["constant.other.symbol.ruby",":_thing"], + ["text",", "], + ["constant.other.symbol.ruby",":thing"], + ["text",", "], + ["constant.other.symbol.ruby",":Thing"], + ["text",", "], + ["constant.other.symbol.ruby",":thing1"], + ["text",", "], + ["constant.other.symbol.ruby",":thing_a"], + ["text",","] +],[ + "start", + ["text"," "], + ["constant.other.symbol.ruby",":THING"], + ["text",", "], + ["constant.other.symbol.ruby",":thing!"], + ["text",", "], + ["constant.other.symbol.ruby",":thing="], + ["text",", "], + ["constant.other.symbol.ruby",":thing?"], + ["text",", "], + ["constant.other.symbol.ruby",":t?"], + ["text",","] +],[ + "start", + ["text"," :, :@, :"], + ["keyword.operator","$"], + ["text",", :"], + ["constant.numeric","1"], + ["text",", :1"], + ["identifier","thing"], + ["text",", "], + ["constant.other.symbol.ruby",":th?"], + ["identifier","ing"], + ["text",", "], + ["constant.other.symbol.ruby",":thi="], + ["identifier","ng"], + ["text",", :1"], + ["identifier","thing"], + ["text",","] +],[ + "start", + ["text"," "], + ["constant.other.symbol.ruby",":th!"], + ["identifier","ing"], + ["text",", "], + ["constant.other.symbol.ruby",":thing"], + ["comment","#"] ],[ "start", ["text"," "], - ["paren.lparen","{"] -],[ - "start", - ["text"," "], - ["string","'json_class'"], - ["text"," "], - ["punctuation.separator.key-value","=>"], - ["text"," "], - ["variable.language","self"], - ["text","."], - ["keyword","class"], - ["text","."], - ["identifier","name"], - ["text",", "], - ["comment","# = 'Range'"] -],[ - "start", - ["text"," "], - ["string","'data'"], - ["text"," "], - ["punctuation.separator.key-value","=>"], - ["text"," "], - ["paren.lparen","["], - ["text"," "], - ["identifier","first"], - ["text",", "], - ["identifier","last"], - ["text",", "], - ["identifier","exclude_end"], - ["text","? "], ["paren.rparen","]"] -],[ - "start", - ["text"," "], - ["paren.rparen","}"], - ["text","."], - ["identifier","to_json"], - ["paren.lparen","("], - ["keyword.operator","*"], - ["identifier","a"], - ["paren.rparen",")"] -],[ - "start", - ["text"," "], - ["keyword","end"] -],[ - "start", - ["keyword","end"] ],[ "start" ],[ "start", - ["paren.lparen","{"], - ["constant.other.symbol.ruby",":id"], ["text"," "], - ["punctuation.separator.key-value","=>"], + ["comment","#test: namespaces aren't symbols\" : function() {"] +],[ + "start", + ["text"," "], + ["support.class","Namespaced"], + ["text","::"], + ["support.class","Class"] +],[ + "start", ["text"," "], - ["constant.numeric","34"], + ["comment","#test: hex tokenizer "] +],[ + "start", + ["text"," "], + ["constant.numeric","0x9a"], ["text",", "], - ["constant.other.symbol.ruby",":sdfasdfasdf"], + ["constant.numeric","0XA1"], + ["text",", "], + ["constant.numeric","0x9_a"], + ["text",", 0"], + ["identifier","x"], + ["text",", 0"], + ["identifier","x_9a"], + ["text",", 0"], + ["identifier","x9a_"], + ["text",","] +],[ + "start", ["text"," "], - ["punctuation.separator.key-value","=>"], - ["text"," "], - ["string","\"asdasdads\""], - ["paren.rparen","}"] + ["comment","#test: float tokenizer"] +],[ + "start", + ["text"," "], + ["paren.lparen","["], + ["constant.numeric","1"], + ["text",", "], + ["constant.numeric","+1"], + ["text",", "], + ["constant.numeric","-1"], + ["text",", "], + ["constant.numeric","12_345"], + ["text",", "], + ["constant.numeric","0.000_1"], + ["text",","] +],[ + "start", + ["text"," "], + ["identifier","_"], + ["text",", "], + ["constant.numeric","3_1"], + ["text",", "], + ["constant.numeric","1_2"], + ["text",", 1"], + ["identifier","_"], + ["text","."], + ["constant.numeric","0"], + ["text",", "], + ["constant.numeric","0"], + ["text","."], + ["identifier","_1"], + ["paren.rparen","]"], + ["text",";"] +],[ + "start", + ["text"," "] ]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_sh.json b/lib/ace/mode/_test/tokens_sh.json index d490692e..11e8698b 100644 --- a/lib/ace/mode/_test/tokens_sh.json +++ b/lib/ace/mode/_test/tokens_sh.json @@ -1,23 +1,89 @@ [[ "start", - ["comment","#!/bin/sh"] + ["text","#!"], + ["keyword.operator","/"], + ["identifier","bin"], + ["keyword.operator","/"], + ["identifier","sh"] ],[ "start" ],[ "start", - ["comment","# Script to open a browser to current branch"] + ["text","# "], + ["identifier","Script"], + ["text"," "], + ["identifier","to"], + ["text"," "], + ["identifier","open"], + ["text"," "], + ["identifier","a"], + ["text"," "], + ["identifier","browser"], + ["text"," "], + ["identifier","to"], + ["text"," "], + ["identifier","current"], + ["text"," "], + ["identifier","branch"] ],[ "start", - ["comment","# Repo formats:"] + ["text","# "], + ["identifier","Repo"], + ["text"," "], + ["identifier","formats"], + ["text",":"] ],[ "start", - ["comment","# ssh git@github.com:richoH/gh_pr.git"] + ["text","# "], + ["identifier","ssh"], + ["text"," "], + ["identifier","git"], + ["text","@"], + ["identifier","github"], + ["text","."], + ["identifier","com"], + ["text",":"], + ["identifier","richoH"], + ["keyword.operator","/"], + ["identifier","gh_pr"], + ["text","."], + ["identifier","git"] ],[ "start", - ["comment","# http https://richoH@github.com/richoH/gh_pr.git"] + ["text","# "], + ["identifier","http"], + ["text"," "], + ["identifier","https"], + ["text",":"], + ["keyword.operator","//"], + ["identifier","richoH"], + ["text","@"], + ["identifier","github"], + ["text","."], + ["identifier","com"], + ["keyword.operator","/"], + ["identifier","richoH"], + ["keyword.operator","/"], + ["identifier","gh_pr"], + ["text","."], + ["identifier","git"] ],[ "start", - ["comment","# git git://github.com/richoH/gh_pr.git"] + ["text","# "], + ["identifier","git"], + ["text"," "], + ["identifier","git"], + ["text",":"], + ["keyword.operator","//"], + ["identifier","github"], + ["text","."], + ["identifier","com"], + ["keyword.operator","/"], + ["identifier","richoH"], + ["keyword.operator","/"], + ["identifier","gh_pr"], + ["text","."], + ["identifier","git"] ],[ "start" ],[ @@ -269,6 +335,28 @@ ["paren.rparen","}"] ],[ "start" +],[ + "start", + ["variable","x="], + ["paren.lparen","("], + ["constant.numeric","1"], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["constant.numeric","3"], + ["paren.rparen",")"] +],[ + "start", + ["support.function.builtin","echo"], + ["text"," $"], + ["paren.lparen","{"], + ["text","#"], + ["identifier","x"], + ["paren.lparen","["], + ["text","@"], + ["paren.rparen","]}"] +],[ + "start" ],[ "start", ["keyword","if"], diff --git a/lib/ace/mode/_test/tokens_xml.json b/lib/ace/mode/_test/tokens_xml.json index 19762eca..f7c1ed64 100644 --- a/lib/ace/mode/_test/tokens_xml.json +++ b/lib/ace/mode/_test/tokens_xml.json @@ -1,539 +1,43 @@ [[ "start", - ["xml-pe",""] -],[ - "tag_embed_attribute_list", ["meta.tag","<"], - ["meta.tag.tag-name","query"], - ["text"," "], - ["entity.other.attribute-name","xmlns:yahoo"], - ["keyword.operator","="], - ["string","\"http://www.yahooapis.com/v1/base.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","yahoo:count"], - ["keyword.operator","="], - ["string","\"7\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:created"], - ["keyword.operator","="], - ["string","\"2011-10-11T08:40:23Z\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","diagnostics"], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","publiclyCallable"], + ["meta.tag.tag-name","Juhu"], ["meta.tag.r",">"], - ["text","true"], + ["text","//Juhu Kinners"], ["meta.tag",""] ],[ "start", - ["text"," "], + ["text","test: two tags in the same lines should be in separate tokens\""] +],[ + "start", ["meta.tag","<"], - ["meta.tag.tag-name","url"], + ["meta.tag.tag-name","Juhu"], + ["meta.tag.r",">"], + ["meta.tag","<"], + ["meta.tag.tag-name","Kinners"], + ["meta.tag.r",">"] +],[ + "start", + ["text","test: multiline attributes\""] +],[ + "tag_qqstring", + ["meta.tag","<"], + ["meta.tag.tag-name","copy"], ["text"," "], - ["entity.other.attribute-name","execution-start-time"], + ["entity.other.attribute-name","set"], ["keyword.operator","="], - ["string","\"0\""], + ["string","\"{"] +],[ + "tag_qqstring", + ["string","}\""], ["text"," "], - ["entity.other.attribute-name","execution-stop-time"], + ["entity.other.attribute-name","undo"], ["keyword.operator","="], - ["string","\"25\""], - ["text"," "], - ["entity.other.attribute-name","execution-time"], - ["keyword.operator","="], - ["string","\"25\""], - ["meta.tag.r",">"], - ["text",""], - ["meta.tag",""] + ["string","\"{"] ],[ "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","user-time"], - ["meta.tag.r",">"], - ["text","26"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","service-time"], - ["meta.tag.r",">"], - ["text","25"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","build-version"], - ["meta.tag.r",">"], - ["text","21978"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""], - ["text"," "] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","results"], - ["meta.tag.r",">"] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/24865670\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","24865670"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","Africa"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/24865675\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","24865675"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","Europe"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/24865673\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","24865673"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","South America"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/28289421\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","28289421"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","Antarctic"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/24865671\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","24865671"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","Asia"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/24865672\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","24865672"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","North America"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "tag_embed_attribute_list", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","place"], - ["text"," "], - ["entity.other.attribute-name","xmlns"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/schema.rng\""] -],[ - "start", - ["text"," "], - ["entity.other.attribute-name","xml:lang"], - ["keyword.operator","="], - ["string","\"en-US\""], - ["text"," "], - ["entity.other.attribute-name","yahoo:uri"], - ["keyword.operator","="], - ["string","\"http://where.yahooapis.com/v1/place/55949070\""], - ["meta.tag.r",">"] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","woeid"], - ["meta.tag.r",">"], - ["text","55949070"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","placeTypeName"], - ["text"," "], - ["entity.other.attribute-name","code"], - ["keyword.operator","="], - ["string","\"29\""], - ["meta.tag.r",">"], - ["text","Continent"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag","<"], - ["meta.tag.tag-name","name"], - ["meta.tag.r",">"], - ["text","Australia"], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "start", - ["text"," "], - ["meta.tag",""] -],[ - "start", - ["meta.tag",""] + ["string","}\""], + ["meta.tag.r","/>"] ]] \ No newline at end of file