mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Add an "extended token" concept
This commit is contained in:
1 parent
7d684f94ae
commit
462f86675d
7 files changed
+133
-97
No files matched your search
@@ -433,7 +433,7 @@ JsonThing::parse(TokenStream& ts) {
|
||||
return Result(std::move(tsr.status_msg));
|
||||
}
|
||||
|
||||
uint64_t vbc = tsr.token.value_base_category();
|
||||
int64_t vbc = tsr.token.value_base_category();
|
||||
uint64_t vbd = tsr.token.value_base_detail();
|
||||
switch (vbc) {
|
||||
case WUFFS_BASE__TOKEN__VBC__FILLER:
|
||||
@@ -469,7 +469,7 @@ JsonThing::parse_array(TokenStream& ts) {
|
||||
if (!tsr.status_msg.empty()) {
|
||||
return Result(std::move(tsr.status_msg));
|
||||
}
|
||||
uint64_t vbc = tsr.token.value_base_category();
|
||||
int64_t vbc = tsr.token.value_base_category();
|
||||
uint64_t vbd = tsr.token.value_base_detail();
|
||||
if (vbc == WUFFS_BASE__TOKEN__VBC__FILLER) {
|
||||
ts.next();
|
||||
@@ -556,7 +556,7 @@ JsonThing::parse_object(TokenStream& ts) {
|
||||
if (!tsr.status_msg.empty()) {
|
||||
return Result(std::move(tsr.status_msg));
|
||||
}
|
||||
uint64_t vbc = tsr.token.value_base_category();
|
||||
int64_t vbc = tsr.token.value_base_category();
|
||||
uint64_t vbd = tsr.token.value_base_detail();
|
||||
if (vbc == WUFFS_BASE__TOKEN__VBC__FILLER) {
|
||||
ts.next();
|
||||
@@ -596,7 +596,7 @@ JsonThing::parse_string(TokenStream& ts, TokenStream::Result tsr) {
|
||||
JsonThing jt;
|
||||
jt.kind = Kind::String;
|
||||
while (true) {
|
||||
uint64_t vbc = tsr.token.value_base_category();
|
||||
int64_t vbc = tsr.token.value_base_category();
|
||||
uint64_t vbd = tsr.token.value_base_detail();
|
||||
|
||||
switch (vbc) {
|
||||
|
||||
@@ -836,7 +836,7 @@ handle_unicode_code_point(uint32_t ucp) {
|
||||
const char* //
|
||||
handle_token(wuffs_base__token t) {
|
||||
do {
|
||||
uint64_t vbc = t.value_base_category();
|
||||
int64_t vbc = t.value_base_category();
|
||||
uint64_t vbd = t.value_base_detail();
|
||||
uint64_t len = t.length();
|
||||
|
||||
|
||||
Reference in new issue
Block a user