This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First, let's look at the traditional visitor pattern | |
// This is how we might implement a simple expression evaluator | |
// Traditional Visitor Pattern | |
namespace Traditional { | |
// Abstract base class for expressions | |
abstract class Expr { | |
abstract accept<T>(visitor: ExprVisitor<T>): T; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "swc-miri-ub" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
swc = "0.102.2" | |
swc_ecmascript = { version="0.104.3", features = ["visit", "parser", "typescript"] } |