Reinsert numerics, fix up tests

This commit is contained in:
Garen Torikian 2012-11-13 14:33:31 -08:00 • committed by nightwing
commit 15d25743dc
2 changed files with 7 additions and 5 deletions

View file

@ -158,7 +158,9 @@ var RubyHighlightRules = function() {
},
constantOtherSymbol,
constantNumericHex,
constantNumericFloat,
{
token : "constant.language.boolean",
regex : "(?:true|false)\\b"

View file

@ -48,10 +48,10 @@ module.exports = {
"test: symbol tokenizer" : function() {
// 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?", ":t?"]);
assertInvalidTokens(this.tokenizer, "string",
assertInvalidTokens(this.tokenizer, "constant.other.symbol.ruby",
[":", ":@", ":$", ":1", ":1thing", ":th?ing", ":thi=ng", ":1thing",
":th!ing", ":thing#"]);
},
@ -61,9 +61,9 @@ module.exports = {
var tokens = this.tokenizer.getLineTokens(line, "start").tokens;
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("variable.class", tokens[2].type);
assert.equal("support.class", tokens[2].type);
},
"test: hex tokenizer" : function() {