Syntax hilighting update.

pull/1/head
chriseth 10 years ago
parent 6031cd5678
commit 95923dba80
  1. 10
      mode-solidity.js

@ -56,17 +56,17 @@ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocComme
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var JavaScriptHighlightRules = function(options) { var JavaScriptHighlightRules = function(options) {
var intTypes = 'hash|int|uint'; var intTypes = 'bytes|int|uint';
for (var width = 8; width <= 256; width += 8) for (var width = 8; width <= 256; width += 8)
intTypes += '|hash' + width + '|uint' + width + '|int' + width; intTypes += '|bytes' + (width / 8) + '|uint' + width + '|int' + width;
var keywordMapper = this.createKeywordMapper({ var keywordMapper = this.createKeywordMapper({
"variable.language": "variable.language":
"this|bool|address|" + intTypes, "this|bool|byte|bytes|bytes0|address|" + intTypes,
"keyword": "keyword":
"contract|constant|" + "contract|constant|" +
"struct|mapping|break|continue|delete|else|for|function|" + "struct|mapping|enum|break|continue|delete|else|for|function|" +
"if|new|return|returns|var|while|" + "if|new|return|returns|var|while|" +
"private|public", "private|public|external|internal",
"storage.type": "storage.type":
"constant|var|function", "constant|var|function",
"constant.language.boolean": "true|false" "constant.language.boolean": "true|false"

Loading…
Cancel
Save