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.

mixin.ts 501B

1234567891011121314151617181920212223
  1. import * as AST from '../ast';
  2. import Env from '../env';
  3. import Token from '../token';
  4. export class Mixin {
  5. public name: Token;
  6. public parameters: AST.Identifier[];
  7. public children: AST.Child[];
  8. public constructor(
  9. name: Token,
  10. parameters: AST.Identifier[],
  11. children: AST.Child[]
  12. ) {
  13. this.name = name;
  14. this.parameters = parameters;
  15. this.children = children;
  16. }
  17. public compile(env: Env, _opts: AST.Opts) {
  18. env.set(this.name.value, this);
  19. return '';
  20. }
  21. }