-
-
Save IMSoP/0d180555dbc1f78741bd8bbe30bbce1b to your computer and use it in GitHub Desktop.
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
<?php | |
sealed class Token { | |
public bool $isSignificant; | |
class Identifier { | |
public function __construct(public string $name) { | |
$this->isSignificant = true; | |
} | |
} | |
class Whitespace() { | |
public function __construct() { | |
$this->isSignificant = true; | |
} | |
} | |
class Comment() { | |
public function __construct(public string $comment) { | |
$this->isSignificant = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment