Ommit Warnings for Code.eval && EEx.eval


is there any way to prevent warnings from being emitted when using Code.eval_string and EEx.eval_string ?

Out of interest - why you are using these at all?

It’s for a css pre-processor I’m writing:

So that you can do things like this:

@fn breakpoint_max(bp, breakpoints) ->
  bp = String.to_existing_atom(bp)
  max = Keyword.get(breakpoints, bp)
  "@media screen and (max-width: #{max}) { #{ctx_content} }"

In your stylesheets, similar to sass/scss. In this case ctx_content will be injected as an argument when I “build” the function. But a function doesn’t need to use it.

In this case it allows one to write then in the stylesheet:

div { 
   background-color: black;
   @fn::breakpoint_max(sm, %::breakpoints, 
     .some-css-rules {
        display: flex;

So when functions don’t use it it emits warnings when compiling the stylesheets.