Skip to content

Commit

Permalink
update to antlr@4.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WuK committed Feb 21, 2024
1 parent 2d14130 commit ee536f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: LLVM
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"image": "wukan0621/sysu-lang:v2404.0.0.20240115"
"image": "wukan0621/sysu-lang"
}
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: BASE_IMAGE=ubuntu:noble
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/ppc64le,linux/s390x
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/ppc64le,linux/s390x,linux/riscv64
3 changes: 2 additions & 1 deletion grammar/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ int main(int argc, char **argv) {
// 请续写此处的词法分析器
for (auto token : tokens.getTokens()) {
if (token->getChannel() != antlr4::Token::HIDDEN_CHANNEL) {
std::string t = lexer.getVocabulary().getSymbolicName(token->getType());
auto t1 = lexer.getVocabulary().getSymbolicName(token->getType());
std::string t(t1.begin(), t1.end());
std::unordered_map<std::string, std::string> transform_table{
{"Int", "int"},
{"Identifier", "identifier"},
Expand Down

0 comments on commit ee536f3

Please sign in to comment.