walt-compiler
Advanced tools
Comparing version 0.12.0 to 0.13.0
{ | ||
"name": "walt-compiler", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Alternative syntax for WebAssembly text format", | ||
@@ -47,4 +47,4 @@ "main": "dist/walt.js", | ||
"nearley": "^2.15.1", | ||
"walt-parser-tools": "^0.2.0", | ||
"walt-syntax": "^0.3.0", | ||
"walt-parser-tools": "^0.2.1", | ||
"walt-syntax": "^0.3.1", | ||
"wasm-types": "1.0.3" | ||
@@ -51,0 +51,0 @@ }, |
@@ -9,2 +9,14 @@ /** | ||
const escapeMap = { | ||
['\\0']: 0x00, | ||
['\\a']: 0x07, | ||
['\\b']: 0x08, | ||
['\\t']: 0x09, | ||
['\\n']: 0x0a, | ||
['\\v']: 0x0b, | ||
['\\f']: 0x0c, | ||
['\\r']: 0x0d, | ||
["\\'"]: 0x27, | ||
}; | ||
export default function Strings(): SemanticPlugin { | ||
@@ -14,3 +26,3 @@ return { | ||
[Syntax.CharacterLiteral]: _ => ([node, context], transform) => { | ||
const codePoint = node.value.codePointAt(0); | ||
const codePoint = escapeMap[node.value] || node.value.codePointAt(0); | ||
@@ -17,0 +29,0 @@ return transform([ |
@@ -33,3 +33,3 @@ // @flow | ||
}; | ||
export const VERSION = '0.12.0'; | ||
export const VERSION = '0.13.0'; | ||
@@ -36,0 +36,0 @@ // Used for debugging purposes |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
9514766
11757
Updatedwalt-parser-tools@^0.2.1
Updatedwalt-syntax@^0.3.1