A stylesheet language written in TypeScript that compiles to CSS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

identifier.ts 408B

1234567891011121314151617
  1. import * as AST from '../ast';
  2. import Env, { EnvError } from '../env';
  3. import Token from '../token';
  4. export class Identifier {
  5. public name: Token;
  6. public constructor(name: Token) {
  7. this.name = name;
  8. }
  9. public compile(env: Env, opts: AST.Opts): string | EnvError {
  10. const value = env.get(this.name);
  11. if (value instanceof EnvError) return value;
  12. return value.compile(env, opts);
  13. }
  14. }