# Punctuation & spacing # *Lout* # vim:ft=lout: export "<<" ">>" "(" ":" ";" "?" "!" def @PunctuationSetup { # Unbreakable `French quotes' (guillemets) def "<<" precedence 10 right word { { @Char guillemotleft }" "{ word } } def ">>" precedence 10 left word { { word }" "{ @Char guillemotright } } # Parenthesis (to avoid "(" at the beginning of a line) def "(" precedence 10 associativity left left l right r { { l }" ("{ r } } # Punctuation spacing def ":" precedence 10 associativity left left word { @CurrLang @Case { French @Yield { { word }" :" } else @Yield { { word }":" } } } def ";" left word { @CurrLang @Case { # Half a space before, one space after French @Yield { { word } |0.5s ";" } else @Yield { { word }";" } } } def "!" left word { @CurrLang @Case { # Half a space before, one space after French @Yield { { word } |0.5s "!" } else @Yield { { word }"!" } } } def "?" left word { @CurrLang @Case { # Half a space before, one space after French @Yield { { word } |0.5s "?" } else @Yield { { word }"?" } } } } @Use { @PunctuationSetup }