- Add npm scripts for CSS/JS compilation (build:css, build:js, build) - Create PowerShell build automation script - Document development workflow in README - Add troubleshooting guide for build issues - Specify proper file structure and compilation process Supports Tailwind CSS v3.4.0 and esbuild bundling with source maps.
20 lines
511 B
JavaScript
20 lines
511 B
JavaScript
|
|
import {TokenType as tt} from "../parser/tokenizer/types";
|
|
|
|
import Transformer from "./Transformer";
|
|
|
|
export default class OptionalCatchBindingTransformer extends Transformer {
|
|
constructor( tokens, nameManager) {
|
|
super();this.tokens = tokens;this.nameManager = nameManager;;
|
|
}
|
|
|
|
process() {
|
|
if (this.tokens.matches2(tt._catch, tt.braceL)) {
|
|
this.tokens.copyToken();
|
|
this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|