Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WHATWG Infra ASCII code point definition #254

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ A [=tokenizer=] has an associated <dfn for=tokenizer>code point</dfn>, a Unicode
1. Let |error| be false.
1. While |regexp position| is less than |tokenizer|'s [=tokenizer/input=]'s [=string/code point length=]:
1. Run [=seek and get the next code point=] given |tokenizer| and |regexp position|.
1. If the result of running [=is ASCII=] given |tokenizer|'s [=tokenizer/code point=] is false:
1. If |tokenizer|'s [=tokenizer/code point=] is not an [=ASCII code point=]:
1. Run [=process a tokenizing error=] given |tokenizer|, |regexp start|, and |tokenizer|'s [=tokenizer/index=].
1. Set |error| to true.
1. [=Break=].
Expand All @@ -1090,7 +1090,7 @@ A [=tokenizer=] has an associated <dfn for=tokenizer>code point</dfn>, a Unicode
1. Set |error| to true.
1. [=Break=]
1. Run [=get the next code point=] given |tokenizer|.
1. If the result of running [=is ASCII=] given |tokenizer|'s [=tokenizer/code point=] is false:
1. If |tokenizer|'s [=tokenizer/code point=] is not an [=ASCII code point=]:
1. Run [=process a tokenizing error=] given |tokenizer|, |regexp start|, and |tokenizer|'s [=tokenizer/index=].
1. Set |error| to true.
1. [=Break=].
Expand Down Expand Up @@ -1183,13 +1183,6 @@ A [=tokenizer=] has an associated <dfn for=tokenizer>code point</dfn>, a Unicode
1. Otherwise return the result of checking if |code point| is contained in the [=IdentifierPart=] set of code points.
</div>

<div algorithm>
To determine if a Unicode |code point| <dfn>is ASCII</dfn>:

1. If |code point| is between U+0000 and U+007F inclusive, then return true.
1. Otherwise return false.
</div>

<h4 id=parts>Parts</h4>

A <dfn>part list</dfn> is a [=list=] of zero or more [=parts=].
Expand Down