File tree Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 849
849
850
850
function lex_prime (l, doemit = true )
851
851
if l. last_token == Tokens. IDENTIFIER ||
852
- Tokens. iscontexturalkeyword (l. last_token) ||
852
+ Tokens. iscontextualkeyword (l. last_token) ||
853
853
Tokens. iswordoperator (l. last_token) ||
854
854
l. last_token == Tokens. DOT ||
855
855
l. last_token == Tokens. RPAREN ||
900
900
# A '"' has been consumed
901
901
function lex_quote (l:: Lexer )
902
902
raw = l. last_token == Tokens. IDENTIFIER ||
903
- Tokens. iscontexturalkeyword (l. last_token) ||
903
+ Tokens. iscontextualkeyword (l. last_token) ||
904
904
Tokens. iswordoperator (l. last_token)
905
905
pc, dpc = dpeekchar (l)
906
906
triplestr = pc == ' "' && dpc == ' "'
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ iskeyword(k::Kind) = begin_keywords < k < end_keywords
11
11
isliteral (k:: Kind ) = begin_literal < k < end_literal
12
12
isoperator (k:: Kind ) = begin_ops < k < end_ops
13
13
14
- iscontexturalkeyword (k:: Kind ) = begin_contextural_keywords < k < end_contextural_keywords
14
+ iscontextualkeyword (k:: Kind ) = begin_contextual_keywords < k < end_contextual_keywords
15
15
16
16
function iswordoperator (k:: Kind )
17
17
# Keyword-like operators
Original file line number Diff line number Diff line change 37
37
TRY,
38
38
USING,
39
39
WHILE,
40
- begin_contextural_keywords ,
40
+ begin_contextual_keywords ,
41
41
ABSTRACT,
42
42
AS,
43
43
DOC,
46
46
PRIMITIVE,
47
47
TYPE,
48
48
VAR,
49
- end_contextural_keywords ,
49
+ end_contextual_keywords ,
50
50
end_keywords,
51
51
52
52
begin_cstparser,
Original file line number Diff line number Diff line change 333
333
@test ts[4 ] ~ (T. DQUOTE , " \" " )
334
334
@test ts[5 ] ~ (T. ENDMARKER , " " )
335
335
336
- # Contextural keywords and operators allowed as raw string prefixes
336
+ # Contextual keywords and operators allowed as raw string prefixes
337
337
ts = collect (tokenize (raw """ var"x $ \ y" """ ))
338
338
@test ts[2 ] ~ (T. VAR , " var" )
339
339
@test ts[4 ] ~ (T. STRING , " x \$ \\ y" )
@@ -782,7 +782,7 @@ const all_kws = Set([
782
782
" try" ,
783
783
" using" ,
784
784
" while" ,
785
- # Contextural keywords
785
+ # Contextual keywords
786
786
" abstract" ,
787
787
" as" ,
788
788
" doc" ,
Original file line number Diff line number Diff line change 237
237
238
238
function is_reserved_word (k)
239
239
k = kind (k)
240
- is_keyword (k) && ! is_contextural_keyword (k)
240
+ is_keyword (k) && ! is_contextual_keyword (k)
241
241
end
242
242
243
243
# Return true if the next word (or word pair) is reserved, introducing a
@@ -246,7 +246,7 @@ function peek_initial_reserved_words(ps::ParseState)
246
246
k = peek (ps)
247
247
if is_initial_reserved_word (ps, k)
248
248
return true
249
- elseif is_contextural_keyword (k)
249
+ elseif is_contextual_keyword (k)
250
250
k2 = peek (ps,2 )
251
251
return (k == K " mutable" && k2 == K " struct" ) ||
252
252
(k == K " primitive" && k2 == K " type" ) ||
@@ -1636,7 +1636,7 @@ end
1636
1636
# parse expressions or blocks introduced by syntactic reserved words.
1637
1637
#
1638
1638
# The caller should use peek_initial_reserved_words to determine whether
1639
- # to call parse_resword, or whether contextural keywords like `mutable` are
1639
+ # to call parse_resword, or whether contextual keywords like `mutable` are
1640
1640
# simple identifiers.
1641
1641
#
1642
1642
# flisp: parse-resword
Original file line number Diff line number Diff line change 42
42
" try" => Ts. TRY
43
43
" using" => Ts. USING
44
44
" while" => Ts. WHILE
45
- # contextural keywords
45
+ # contextual keywords
46
46
" abstract" => Ts. ABSTRACT
47
47
" as" => Ts. AS
48
48
" doc" => Ts. DOC
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ kind(raw::TzTokens.RawToken) = TzTokens.exactkind(raw)
43
43
# Some renaming for naming consistency
44
44
is_literal (k) = TzTokens. isliteral (kind (k))
45
45
is_keyword (k) = TzTokens. iskeyword (kind (k))
46
- is_contextural_keyword (k) = TzTokens. iscontexturalkeyword (kind (k))
46
+ is_contextual_keyword (k) = TzTokens. iscontextualkeyword (kind (k))
47
47
is_operator (k) = TzTokens. isoperator (kind (k))
48
48
is_word_operator (k) = TzTokens. iswordoperator (kind (k))
49
49
You can’t perform that action at this time.
0 commit comments