← go back
/**
* Tokens for use in parsers.
*/
public class Token {
/*
Me: Mom, can we have ADTs?
Mom: We already have ADTs in Java
ADTs in Java:
*/
public record Number(BigInteger num) {}
public record Word(String name, BigInteger prefix) {}
public record SequenceBuilder(BigInteger[] initial, Token[] operation) {}
public record MacroStart(String name) {}
public record MacroEnd() {}
}
Sep 23, 2024, 2:48 AM
2 0 0
Comments