Reinsert numerics, fix up tests
This commit is contained in:
parent
fdb22c5b14
commit
15d25743dc
2 changed files with 7 additions and 5 deletions
|
|
@ -158,7 +158,9 @@ var RubyHighlightRules = function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
constantOtherSymbol,
|
constantOtherSymbol,
|
||||||
|
constantNumericHex,
|
||||||
|
constantNumericFloat,
|
||||||
|
|
||||||
{
|
{
|
||||||
token : "constant.language.boolean",
|
token : "constant.language.boolean",
|
||||||
regex : "(?:true|false)\\b"
|
regex : "(?:true|false)\\b"
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,10 @@ module.exports = {
|
||||||
|
|
||||||
"test: symbol tokenizer" : function() {
|
"test: symbol tokenizer" : function() {
|
||||||
// https://gist.github.com/1072693
|
// https://gist.github.com/1072693
|
||||||
assertValidTokens(this.tokenizer, "string",
|
assertValidTokens(this.tokenizer, "constant.other.symbol.ruby",
|
||||||
[":@thing", ":$thing", ":_thing", ":thing", ":Thing", ":thing1", ":thing_a",
|
[":@thing", ":$thing", ":_thing", ":thing", ":Thing", ":thing1", ":thing_a",
|
||||||
":THING", ":thing!", ":thing=", ":thing?", ":t?"]);
|
":THING", ":thing!", ":thing=", ":thing?", ":t?"]);
|
||||||
assertInvalidTokens(this.tokenizer, "string",
|
assertInvalidTokens(this.tokenizer, "constant.other.symbol.ruby",
|
||||||
[":", ":@", ":$", ":1", ":1thing", ":th?ing", ":thi=ng", ":1thing",
|
[":", ":@", ":$", ":1", ":1thing", ":th?ing", ":thi=ng", ":1thing",
|
||||||
":th!ing", ":thing#"]);
|
":th!ing", ":thing#"]);
|
||||||
},
|
},
|
||||||
|
|
@ -61,9 +61,9 @@ module.exports = {
|
||||||
var tokens = this.tokenizer.getLineTokens(line, "start").tokens;
|
var tokens = this.tokenizer.getLineTokens(line, "start").tokens;
|
||||||
|
|
||||||
assert.equal(3, tokens.length);
|
assert.equal(3, tokens.length);
|
||||||
assert.equal("variable.class", tokens[0].type);
|
assert.equal("support.class", tokens[0].type);
|
||||||
assert.equal("text", tokens[1].type);
|
assert.equal("text", tokens[1].type);
|
||||||
assert.equal("variable.class", tokens[2].type);
|
assert.equal("support.class", tokens[2].type);
|
||||||
},
|
},
|
||||||
|
|
||||||
"test: hex tokenizer" : function() {
|
"test: hex tokenizer" : function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue