Doc formatting adjustments
This commit is contained in:
+8
-5
@@ -53,7 +53,7 @@ parse_literal2(Result, Pos, String) ->
|
||||
|
||||
%% @doc
|
||||
%% Parse an untyped Sophia expression into a FATE term
|
||||
%% Like parse_literal/2, but will not produce type errors. This function can
|
||||
%% Like `parse_literal/2', but will not produce type errors. This function can
|
||||
%% still produce parsing errors, and can produce errors when variants or
|
||||
%% records are encountered, since they can't be parsed unless you have type
|
||||
%% information.
|
||||
@@ -67,6 +67,7 @@ parse_literal2(Result, Pos, String) ->
|
||||
parse_literal(String) ->
|
||||
parse_literal(unknown_type(), String).
|
||||
|
||||
|
||||
%%% Tokenizer
|
||||
|
||||
-define(IS_LATIN_UPPER(C), (((C) >= $A) and ((C) =< $Z))).
|
||||
@@ -252,6 +253,8 @@ escape_char($\") -> "\\\"";
|
||||
escape_char($\\) -> "\\\\";
|
||||
escape_char(I) -> I.
|
||||
|
||||
|
||||
|
||||
%%% Sophia Literal Parser
|
||||
|
||||
%%% This parser is a simple recursive descent parser, written explicitly in
|
||||
@@ -961,7 +964,7 @@ wrap_error(Reason, _) -> Reason.
|
||||
%% integers, and strings, but it will misinterpret the types of records and
|
||||
%% unicode characters, and will crash the process if variants are encountered.
|
||||
%%
|
||||
%% fate_to_list/2 should be used whenever possible, especially since
|
||||
%% `fate_to_list/2' should be used whenever possible, especially since
|
||||
%% transaction results are type checked by nodes at runtime.
|
||||
|
||||
fate_to_list(Term) ->
|
||||
@@ -975,7 +978,7 @@ fate_to_list(Term) ->
|
||||
|
||||
%% @doc
|
||||
%% Print a FATE term from gmbytecode in Sophia syntax
|
||||
%% Like fate_to_list/1, but now type information from the AACI data structure
|
||||
%% Like `fate_to_list/1', but now type information from the AACI data structure
|
||||
%% can be provided, in order to correctly interpret types like records,
|
||||
%% variants, and unicode characters. If the type information you provide is
|
||||
%% incorrect for the FATE term provided, then the function will fall back to
|
||||
@@ -988,7 +991,7 @@ fate_to_list(Type, Term) ->
|
||||
|
||||
%% @doc
|
||||
%% Print a FATE term in Sophia syntax, without concatenating
|
||||
%% The fate_to_list/1 function builds an iolist, and then concatenates it into
|
||||
%% The `fate_to_list/1' function builds an iolist, and then concatenates it into
|
||||
%% a list. If you are going to put the term into a bigger iolist directly
|
||||
%% after, or write it to a streaming device, then it can save effort and memory
|
||||
%% to just use the iolist directly.
|
||||
@@ -1007,7 +1010,7 @@ fate_to_iolist(Term) ->
|
||||
|
||||
%% @doc
|
||||
%% Print a FATE term in Sophia syntax, without concatenating
|
||||
%% Prints using type information, like fate_to_list/2, but without spending
|
||||
%% Prints using type information, like `fate_to_list/2', but without spending
|
||||
%% time or memory concatenating the result into a list, like fate_to_iolist/1.
|
||||
|
||||
% Special case for singleton records, since they are erased during compilation.
|
||||
|
||||
Reference in New Issue
Block a user