Skip to content

Commit

Permalink
Use WHATWG Infra ASCII code point definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyroman authored Jan 16, 2025
1 parent aa43064 commit ab1d2fa
Showing 1 changed file with 2 additions and 9 deletions.
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

0 comments on commit ab1d2fa

Please sign in to comment.