Sha256: 98fb266d272d06d04161651f26fa0071b01a41239ec4ae7d56fe21154e03ed95
Contents?: true
Size: 615 Bytes
Versions: 19
Compression:
Stored size: 615 Bytes
Contents
var TYPE = require('../../tokenizer').TYPE; var NUMBER = TYPE.Number; var PERCENTSIGN = TYPE.PercentSign; module.exports = { name: 'Percentage', structure: { value: String }, parse: function() { var start = this.scanner.tokenStart; var number = this.scanner.consume(NUMBER); this.scanner.eat(PERCENTSIGN); return { type: 'Percentage', loc: this.getLocation(start, this.scanner.tokenStart), value: number }; }, generate: function(node) { this.chunk(node.value); this.chunk('%'); } };
Version data entries
19 entries across 18 versions & 4 rubygems