rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.32k stars 731 forks source link

Lexer `make`: top-level `$(eval)` not recognized #1814

Closed egor-tensin closed 2 years ago

egor-tensin commented 2 years ago

Name of the lexer make

Code sample

define stupid_macro
$(1) := $$(subst 0,1,$$(value $(1)))
endef

test_var ?= a0b

$(eval $(call stupid_macro,test_var))

all:
    printf '%s\n' '$(test_var)'

dingus link

Additional context The example is pretty stupid, but there're legitimate use-cases for code like this. It also highlights other problems that reported in other issues.