case.js 238 B

123456789101112131415
  1. export class Case {
  2. constructor (expression) {
  3. this.expression = expression;
  4. this.commands = [];
  5. }
  6. setCommands (commands) {
  7. this.commands = commands;
  8. }
  9. get isDefault () {
  10. return this.expression === null;
  11. }
  12. }