• File: Identifier.js
  • Full Path: /var/www/sandbox/node_modules/css-tree/lib/syntax/node/Identifier.js
  • Date Modified: 02/20/2025 6:18 PM
  • File size: 441 bytes
  • MIME-type: text/plain
  • Charset: utf-8
var TYPE = require('../../tokenizer').TYPE;

var IDENT = TYPE.Ident;

module.exports = {
    name: 'Identifier',
    structure: {
        name: String
    },
    parse: function() {
        return {
            type: 'Identifier',
            loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
            name: this.consume(IDENT)
        };
    },
    generate: function(node) {
        this.chunk(node.name);
    }
};