Slide 25
Slide 25 text
字句解析
• トークンを定義する
• Token { type: token_type, literal: string} の構造体
• Token { type: “Ident”, literal: “x”}
• token_type
• Ident // x, y, foo, bar
• Int // 0, 1, 2, 100, 12345
• String // “aaa”, “Hello”
• Assign // =
• Lt // <
• Eq // ==
• Comma // ,
• LParen // (
• Rbrace // }
• Function, Let, True, False, If, Else, Return
© 2017 Retrieva, Inc. 25