Skip to content

Commit

Permalink
Fix typo (Arraow -> Arrow) (#61921)
Browse files Browse the repository at this point in the history
  • Loading branch information
co63oc authored Feb 23, 2024
1 parent 3f00547 commit 34871d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions paddle/pir/src/core/parser/lexer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Token Lexer::ConsumeToken() {
SkipWhitespace();
if (auto token = LexIdentifier()) {
return *token;
} else if (auto token = LexNumberOrArraow()) {
} else if (auto token = LexNumberOrArrow()) {
return *token;
} else if (auto token = LexEndTagOrNullVal()) {
return *token;
Expand Down Expand Up @@ -84,7 +84,7 @@ std::unique_ptr<Token> Lexer::LexIdentifier() {
return token;
}

std::unique_ptr<Token> Lexer::LexNumberOrArraow() {
std::unique_ptr<Token> Lexer::LexNumberOrArrow() {
if (!isdigit(is.peek()) && is.peek() != '-') {
return nullptr;
}
Expand All @@ -94,7 +94,7 @@ std::unique_ptr<Token> Lexer::LexNumberOrArraow() {

if (token_digit[0] == '-' && is.peek() == '>') {
GetChar();
std::unique_ptr<Token> arrow_token(new Token{"->", ARRAOW});
std::unique_ptr<Token> arrow_token(new Token{"->", ARROW});
return arrow_token;
}
while (isdigit(is.peek())) {
Expand Down
2 changes: 1 addition & 1 deletion paddle/pir/src/core/parser/lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Lexer {
Token ConsumeToken();
Token PeekToken();
std::unique_ptr<Token> LexIdentifier();
std::unique_ptr<Token> LexNumberOrArraow();
std::unique_ptr<Token> LexNumberOrArrow();
std::unique_ptr<Token> LexEndTagOrNullVal();
std::unique_ptr<Token> LexValueId();
std::unique_ptr<Token> LexEOF();
Expand Down
2 changes: 1 addition & 1 deletion paddle/pir/src/core/parser/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum Token_type {
ENDTAG = 3,
VALUEID = 4,
STRING = 5,
ARRAOW = 6,
ARROW = 6,
NULL_ = 7,
};

Expand Down

0 comments on commit 34871d2

Please sign in to comment.