|
|
@ -15,7 +15,7 @@ export const conf = { |
|
|
|
{ open: '[', close: ']', notIn: ['string', 'comment'] }, |
|
|
|
{ open: '[', close: ']', notIn: ['string', 'comment'] }, |
|
|
|
{ open: '(', close: ')', notIn: ['string', 'comment'] } |
|
|
|
{ open: '(', close: ')', notIn: ['string', 'comment'] } |
|
|
|
] |
|
|
|
] |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const language = { |
|
|
|
export const language = { |
|
|
|
defaultToken: '', |
|
|
|
defaultToken: '', |
|
|
@ -39,17 +39,17 @@ export const language = { |
|
|
|
'function', |
|
|
|
'function', |
|
|
|
'modifier', |
|
|
|
'modifier', |
|
|
|
'constructor', |
|
|
|
'constructor', |
|
|
|
//Built-in types
|
|
|
|
// Built-in types
|
|
|
|
'address', |
|
|
|
'address', |
|
|
|
'string', |
|
|
|
'string', |
|
|
|
'bool', |
|
|
|
'bool', |
|
|
|
//Other types
|
|
|
|
// Other types
|
|
|
|
'Int', |
|
|
|
'Int', |
|
|
|
'Uint', |
|
|
|
'Uint', |
|
|
|
'Byte', |
|
|
|
'Byte', |
|
|
|
'Fixed', |
|
|
|
'Fixed', |
|
|
|
'Ufixed', |
|
|
|
'Ufixed', |
|
|
|
//All int
|
|
|
|
// All int
|
|
|
|
'int', |
|
|
|
'int', |
|
|
|
'int8', |
|
|
|
'int8', |
|
|
|
'int16', |
|
|
|
'int16', |
|
|
@ -83,7 +83,7 @@ export const language = { |
|
|
|
'int240', |
|
|
|
'int240', |
|
|
|
'int248', |
|
|
|
'int248', |
|
|
|
'int256', |
|
|
|
'int256', |
|
|
|
//All uint
|
|
|
|
// All uint
|
|
|
|
'uint', |
|
|
|
'uint', |
|
|
|
'uint8', |
|
|
|
'uint8', |
|
|
|
'uint16', |
|
|
|
'uint16', |
|
|
@ -117,7 +117,7 @@ export const language = { |
|
|
|
'uint240', |
|
|
|
'uint240', |
|
|
|
'uint248', |
|
|
|
'uint248', |
|
|
|
'uint256', |
|
|
|
'uint256', |
|
|
|
//All Byte
|
|
|
|
// All Byte
|
|
|
|
'byte', |
|
|
|
'byte', |
|
|
|
'bytes', |
|
|
|
'bytes', |
|
|
|
'bytes1', |
|
|
|
'bytes1', |
|
|
@ -152,7 +152,7 @@ export const language = { |
|
|
|
'bytes30', |
|
|
|
'bytes30', |
|
|
|
'bytes31', |
|
|
|
'bytes31', |
|
|
|
'bytes32', |
|
|
|
'bytes32', |
|
|
|
//All fixed
|
|
|
|
// All fixed
|
|
|
|
'fixed', |
|
|
|
'fixed', |
|
|
|
'fixed0x8', |
|
|
|
'fixed0x8', |
|
|
|
'fixed0x16', |
|
|
|
'fixed0x16', |
|
|
@ -682,7 +682,7 @@ export const language = { |
|
|
|
'fixed240x8', |
|
|
|
'fixed240x8', |
|
|
|
'fixed240x16', |
|
|
|
'fixed240x16', |
|
|
|
'fixed248x8', |
|
|
|
'fixed248x8', |
|
|
|
//All ufixed
|
|
|
|
// All ufixed
|
|
|
|
'ufixed', |
|
|
|
'ufixed', |
|
|
|
'ufixed0x8', |
|
|
|
'ufixed0x8', |
|
|
|
'ufixed0x16', |
|
|
|
'ufixed0x16', |
|
|
@ -1316,7 +1316,7 @@ export const language = { |
|
|
|
// Preprocessor directive
|
|
|
|
// Preprocessor directive
|
|
|
|
[/^\s*#\w+/, 'keyword'], |
|
|
|
[/^\s*#\w+/, 'keyword'], |
|
|
|
|
|
|
|
|
|
|
|
//DataTypes
|
|
|
|
// DataTypes
|
|
|
|
[/int\d*/, 'keyword'], |
|
|
|
[/int\d*/, 'keyword'], |
|
|
|
|
|
|
|
|
|
|
|
// delimiters and operators
|
|
|
|
// delimiters and operators
|
|
|
@ -1366,7 +1366,7 @@ export const language = { |
|
|
|
[/\*\//, 'comment', '@pop'], |
|
|
|
[/\*\//, 'comment', '@pop'], |
|
|
|
[/[\/*]/, 'comment'] |
|
|
|
[/[\/*]/, 'comment'] |
|
|
|
], |
|
|
|
], |
|
|
|
//Identical copy of comment above, except for the addition of .doc
|
|
|
|
// Identical copy of comment above, except for the addition of .doc
|
|
|
|
doccomment: [ |
|
|
|
doccomment: [ |
|
|
|
[/[^\/*]+/, 'comment.doc'], |
|
|
|
[/[^\/*]+/, 'comment.doc'], |
|
|
|
[/\*\//, 'comment.doc', '@pop'], |
|
|
|
[/\*\//, 'comment.doc', '@pop'], |
|
|
@ -1380,4 +1380,4 @@ export const language = { |
|
|
|
[/"/, 'string', '@pop'] |
|
|
|
[/"/, 'string', '@pop'] |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|