Files
n8n-openai-adapter/lib/elixir/src/elixir.hrl
T
José Valim c1bd106613 Rely on side effects for preserving comments
The previous implementation would not lead to parsing
errors in interpolations since code inside interpolation
is parsed immediately.
2017-10-05 13:27:25 +02:00

41 lines
1.3 KiB
Erlang

-define(key(M, K), maps:get(K, M)).
-define(ann(Opts), elixir_erl:get_ann(Opts)).
-define(line(Opts), elixir_utils:get_line(Opts)).
-define(generated(Meta), [{generated, true} | Meta]).
-define(var_context, ?MODULE).
-record(elixir_erl, {
context=nil, %% can be match, guards or nil
extra=nil, %% extra information about the context, like pin_guard and map_key
caller=false, %% when true, it means caller was invoked
vars=#{}, %% a map of defined variables and their alias
backup_vars=nil, %% a copy of vars to be used on ^var
export_vars=nil, %% a dict of all variables defined in a particular clause
extra_guards=[], %% extra guards from args expansion
counter=#{}, %% a map counting the variables defined
file=(<<"nofile">>) %% the current scope filename
}).
-record(elixir_quote, {
line=false,
file=nil,
context=nil,
vars_hygiene=true,
aliases_hygiene=true,
imports_hygiene=true,
unquote=true,
unquoted=false,
escape=false,
generated=false
}).
-record(elixir_tokenizer, {
file=(<<"nofile">>),
terminators=[],
unescape=true,
check_terminators=true,
existing_atoms_only=false,
preserve_comments=nil,
identifier_tokenizer=elixir_tokenizer
}).