summary refs log tree commit diff stats
path: root/article/democracy-fundamentals.html
Commit message (Expand)AuthorAgeFilesLines
* number my articlesAndrew Yu2022-09-111-0/+1
* yesAndrew Yu2022-08-021-1/+1
* useless commit messageAndrew Yu2022-07-281-1/+1
* typo `'Andrew Yu2022-07-281-1/+1
* AutosaveAndrew Yu2022-07-281-0/+41
lt'>

             














                                                      
                                       
import macros

# test that when stmt works from within a macro

macro output(s: string, xs: varargs[untyped]): auto =
  result = quote do:
    when compiles(`s`):
      "when - " & `s`
    elif compiles(`s`):
      "elif - " & `s`
      # should never get here so this should not break
      broken.xs
    else:
      "else - " & `s`
      # should never get here so this should not break
      more.broken.xs

doAssert output("test") == "when - test"