This commit is contained in:
Peter Harpending
2026-06-09 10:29:23 -07:00
parent ba70aace96
commit b9d1714c56
+6 -9
View File
@@ -374,11 +374,8 @@ tokens_from_iolist(S) -> tokens(S).
| {error, gsc_err()}, | {error, gsc_err()},
Tokens :: [tk()]. Tokens :: [tk()].
% @doc % @doc
% Recursively parse all tokens off the front end of the string. `Rest' is % Recursively parse all tokens off the front end of the
% the first tail of the string for which no token parser succeeds. % string.
%
% Semantically, `Rest'` being nonempty amounts to the presence of an illegal
% character.
tokens(S) -> tokens(S) ->
% defensive normalization % defensive normalization
@@ -525,7 +522,7 @@ slurp_token(Pos, SrcStr) ->
Rest :: string(). Rest :: string().
% @doc % @doc
% grab a single token off the front of the string according to % grab a single token off the front of the string according to
% `token_shapes_parse_order/0' % `ParseOrder'
slurp_token_shapes([TokenType | TTs], Pos, SrcStr) -> slurp_token_shapes([TokenType | TTs], Pos, SrcStr) ->
case slurp_token_of_shape(TokenType, Pos, SrcStr) of case slurp_token_of_shape(TokenType, Pos, SrcStr) of
@@ -562,9 +559,9 @@ slurp_token_of_shape(lcom, Pos, SrcStr) ->
case SrcStr of case SrcStr of
"//" ++ _ -> "//" ++ _ ->
{Line, Rest} = takeline("", SrcStr), {Line, Rest} = takeline("", SrcStr),
Token = #tk{shape = lcom, Token = #tk{shape = lcom,
pos = Pos, pos = Pos,
str = Line}, str = Line},
{tokmatch, Token, Rest}; {tokmatch, Token, Rest};
_ -> _ ->
no_tokmatch no_tokmatch