update flow literal annotations to have a rawValue

This commit is contained in:
Sebastian McKenzie 2015-07-21 02:37:43 +01:00
parent 73f0f26ae2
commit 30be1317e6
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
var a: 123;
var a: 123.0;
var a: 0x7B;
var a: 123;
var a: 123;
var a: 0b1111011;
var a: 0o173;

View File

@ -488,13 +488,13 @@ pp.flowParsePrimaryType = function () {
return this.finishNode(node, "FunctionTypeAnnotation");
case tt.string:
node.value = this.value;
node.rawValue = node.value = this.value;
node.raw = this.input.slice(this.start, this.end);
this.next();
return this.finishNode(node, "StringLiteralTypeAnnotation");
case tt.num:
node.value = this.value;
node.rawValue = node.value = this.value;
node.raw = this.input.slice(this.start, this.end);
this.next();
return this.finishNode(node, "NumberLiteralTypeAnnotation");