Closed yus1108 closed 1 month ago
필요 토큰 : [x] ... -> {keyword_variadic, "..."} [x] enum -> {keyord_enum, "enum"} [x] : -> {colon, ":"} [x] & -> {ampersand, "&"} [x] < -> {lt, "<"} [x] > -> {gt, ">"} [x] [ -> {lbracket, "["} [x] ] -> {rbracket, "]"} [x] ( -> {lparen, "("} [x] ) -> {rparen, ")"} [x] { -> {lbrace, "("} [x] } -> {rbrace, ")"} [x] , -> {comma, ","} [x] #include <[^>\n\r]+[>\n\r] ->{macro_include, [^>\n\r]+} [x] //[^\n\r]* -> {comment, "[^\n\r]*"} [x] /*(any character except "*/")*/ -> {comment, /*"any character except '*/')"*/} [x] void -> {keyword_void, "void"} [x] unused -> {keyword_unused, "unused"} [x] const -> {keyword_const, "const"} [x] utf8 -> {keyword_utf8, "utf8"} [x] "[^"\n\r]+["\r\n] -> {string_utf8, "[^"\n\r]"}/
필요 토큰 :
...
{keyword_variadic, "..."}
enum
{keyord_enum, "enum"}
:
{colon, ":"}
&
{ampersand, "&"}
<
{lt, "<"}
>
{gt, ">"}
[
{lbracket, "["}
]
{rbracket, "]"}
(
{lparen, "("}
)
{rparen, ")"}
{
{lbrace, "("}
}
{rbrace, ")"}
,
{comma, ","}
#include <[^>\n\r]+[>\n\r]
{macro_include, [^>\n\r]+}
//[^\n\r]*
{comment, "[^\n\r]*"}
/*(any character except "*/")*/
{comment, /*"any character except '*/')"*/}
void
{keyword_void, "void"}
unused
{keyword_unused, "unused"}
const
{keyword_const, "const"}
utf8
{keyword_utf8, "utf8"}
"[^"\n\r]+["\r\n]
{string_utf8, "[^"\n\r]"}
Originally posted by @yus1108 in #18
Originally posted by @yus1108 in #18