@extjs/sencha-cmd-linux-32
Version:
Productivity and performance optimization tool for building applications with Sencha Ext JS and Sencha Touch.
203 lines (173 loc) • 3.67 kB
JavaScript
;
var Fashion = require('../export/Base.js');
class Token {
constructor (scanner) {
this.scanner = scanner;
if (scanner) {
this.idx = scanner.index;
this.lineNumber = scanner.lineNumber;
this.file = scanner.currentFile;
}
}
}
Fashion.apply(Token.prototype, {
$isToken: true,
lineNumber: undefined,
file: undefined,
idx: undefined,
startIdx: undefined,
startLine: undefined,
value: undefined,
start: undefined,
end: undefined
});
class Operator extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Operator.prototype, {
isOperator: true,
type: 'operator'
});
class Ident extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Ident.prototype, {
isIdent: true,
type: 'ident'
});
class StringLiteral extends Token {
constructor (scanner, value, quoteChar) {
super(scanner);
this.value = value;
this.quoteChar = quoteChar;
}
}
Fashion.apply(StringLiteral.prototype, {
isString: true,
type: 'string',
quoteChar: undefined
});
class Percentage extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Percentage.prototype, {
isPercentage: true,
type: 'percentage'
});
class Length extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Length.prototype, {
isLength: true,
type: 'length'
});
class Time extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Time.prototype, {
isTime: true,
type: 'time'
});
class Angle extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Angle.prototype, {
isAngle: true,
type: 'angle'
});
class NumberLiteral extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(NumberLiteral.prototype, {
isNumber: true,
type: 'number'
});
class Class extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Class.prototype, {
isClass: true,
type: 'class'
});
class Hash extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Hash.prototype, {
isHash: true,
type: 'hash'
});
class Variable extends Token {
constructor (scanner, value, negate) {
super(scanner);
this.value = value;
this.negate = negate;
}
}
Fashion.apply(Variable.prototype, {
isVariable: true,
type: 'variable',
negate: undefined
});
class Directive extends Token {
constructor (scanner, value) {
super(scanner);
this.value = value;
}
}
Fashion.apply(Directive.prototype, {
isDirective: true,
type: 'directive'
});
class EOF extends Token {
constructor (scanner) {
super(scanner);
this.value = '';
}
}
Fashion.apply(EOF.prototype, {
isEOF: true,
type: 'eof'
});
module.exports = {
Token: Token,
Operator: Operator,
Ident: Ident,
StringLiteral: StringLiteral,
Percentage: Percentage,
Length: Length,
Time: Time,
Angle: Angle,
NumberLiteral: NumberLiteral,
Class: Class,
Hash: Hash,
Variable: Variable,
Directive: Directive,
EOF: EOF
};