Don't carry RawAST stuff to analyzer at least as possible for mapping literal suffixes
Refactor
[Here](https://github.com/cyrus-lang/Cyrus/blob/67276f5ac2465f5150707724d81af7fda0b8f0a1/crates/cyrusc_sema/src/type_checking/type_checking.rs#L2825), And [here](https://github.com/cyrus-lang/Cyrus/blob/67276f5ac2465f5150707724d81af7fda0b8f0a1/crates/cyrusc_sema/src/type_checking/type_checking.rs#L2847) to give the literal a type by it's suffix, we match the `TokenKind` and return `Option<SemanticType>` which is logically correct; but hence TokenKind is more related to RawAST, it's a good point to use Rust's meta programming features to make such tranforms more consistent. Define once in RawAST, and use the metadata on-demand.
0 条评论