Skip to content

Commit

Permalink
fixup rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Nov 17, 2022
1 parent c5185c3 commit 156e9c0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/lexer.c
Expand Up @@ -638,7 +638,7 @@ void try_parse_export_statement () {
case 'd': {
const char16_t* start_pos = pos;
pos += 7;
ch = commentWhitespace(true);
ch = comment_whitespace(true);
bool localName = false;
// export default async? function*? name? (){}
if (ch == 'a' && keyword_start(pos) && memcmp(pos + 1, &SYNC[0], 4 * 2) == 0 && is_ws_not_br(*(pos + 5))) {
Expand All @@ -653,8 +653,8 @@ void try_parse_export_statement () {
ch = comment_whitespace(true);
}
if (ch == '(') {
addExport(startPos, startPos + 7, NULL, NULL);
pos = (char16_t*)(startPos + 6);
add_export(start_pos, start_pos + 7, NULL, NULL);
pos = (char16_t*)(start_pos + 6);
return;
}
localName = true;
Expand All @@ -664,21 +664,21 @@ void try_parse_export_statement () {
pos += 5;
ch = comment_whitespace(true);
if (ch == '{') {
addExport(startPos, startPos + 7, NULL, NULL);
pos = (char16_t*)(startPos + 6);
add_export(start_pos, start_pos + 7, NULL, NULL);
pos = (char16_t*)(start_pos + 6);
return;
}
localName = true;
}
const char16_t* localStartPos = pos;
ch = readToWsOrPunctuator(ch);
if (localName && pos > localStartPos) {
addExport(startPos, startPos + 7, localStartPos, pos);
const char16_t* localstart_pos = pos;
ch = read_to_ws_or_punctuator(ch);
if (localName && pos > localstart_pos) {
add_export(start_pos, start_pos + 7, localstart_pos, pos);
pos--;
}
else {
addExport(startPos, startPos + 7, NULL, NULL);
pos = (char16_t*)(startPos + 6);
add_export(start_pos, start_pos + 7, NULL, NULL);
pos = (char16_t*)(start_pos + 6);
}
return;
}
Expand Down

0 comments on commit 156e9c0

Please sign in to comment.