diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:36:35 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:36:35 +0000 |
commit | b10d39aec443165093f8f28bc6f940530b89cdaf (patch) | |
tree | 63a1ef3b3f1d2562c498291cda341a2171a1fe1c /include/eiffelf | |
parent | 2f4268e5e02216be53cd85816362191373512463 (diff) | |
download | lout-b10d39aec443165093f8f28bc6f940530b89cdaf.tar.gz |
Lout 3.21.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@11 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include/eiffelf')
-rw-r--r-- | include/eiffelf | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/include/eiffelf b/include/eiffelf index 2beaa6e..573e8a9 100644 --- a/include/eiffelf +++ b/include/eiffelf @@ -17,6 +17,7 @@ export @Eiffel def @EiffelSetup named pipe { } # pipe through this first + named numbered { No } # want lines numbered? named style named @OrIfPlain left x right y { @BackEnd @Case { PlainText @Yield y else @Yield x } } @@ -35,6 +36,7 @@ def @EiffelSetup named fixednumbers { Base } # number face named fixedstrings { Base } # string face named fixedcomments { Base } # comment face + named fixedlinenumbers { Base } # line numbers face named fixedidentifiersformat right @Body { @Body } # identifier format named fixedkeywordsformat right @Body { @Body } # keyword format @@ -42,6 +44,7 @@ def @EiffelSetup named fixednumbersformat right @Body { @Body } # number format named fixedstringsformat right @Body { @Body } # string format named fixedcommentsformat right @Body { @Body } # comment format + named fixedlinenumbersformat right @Body { @Body } # line nums format # the following options apply when style is "varying" named varyingfont { } # font family @@ -56,6 +59,7 @@ def @EiffelSetup named varyingnumbers { Base } # number face named varyingstrings { Slope } # string face named varyingcomments { Base } # comment face + named varyinglinenumbers { Base } # line numbers face named varyingidentifiersformat right @Body { @Body } # identifier format named varyingkeywordsformat right @Body { @Body } # keyword format @@ -63,6 +67,7 @@ def @EiffelSetup named varyingnumbersformat right @Body { @Body } # number format named varyingstringsformat right @Body { @Body } # string format named varyingcommentsformat right @Body { @Body } # comment format + named varyinglinenumbersformat right @Body { @Body } # line nums format # the following options apply when style is "symbol" named symbolfont { } # font family @@ -77,6 +82,7 @@ def @EiffelSetup named symbolnumbers { Base } # number face named symbolstrings { Slope } # string face named symbolcomments { Base } # comment face + named symbollinenumbers { Base } # line numbers face named symbolidentifiersformat right @Body { @Body } # identifier format named symbolkeywordsformat right @Body { @Body } # keyword format @@ -84,16 +90,18 @@ def @EiffelSetup named symbolnumbersformat right @Body { @Body } # number format named symbolstringsformat right @Body { @Body } # string format named symbolcommentsformat right @Body { @Body } # comment format + named symbollinenumbersformat right @Body { @Body } # line nums format @Begin export - @PI @PK @PO @PN @PS @PC @PA @PM @PD + @PI @PK @PO @PN @PS @PC @PL @PA @PM @PD @A "$>" def @Eiffel named style { style } # style + named numbered { numbered } # want numbered lines? named pipe { pipe } # pipe through this first named font { dft } # font family named size { dft } # font size @@ -106,6 +114,7 @@ def @EiffelSetup named numbers { dft } # number font named strings { dft } # string font named comments { dft } # comment font + named linenumbers { dft } # line numbers font body @Body # filtered, see below @Begin @@ -159,14 +168,24 @@ def @EiffelSetup def @Filter { + def wantnumbered + { + numbered @Case { + { No no } @Yield "" + { Yes yes } @Yield "-L" + else @Yield { "-L"numbered } + } + } + pipe @Case { "" @Yield { - "prg2lout -r -lEiffel" -i{@FilterIn} -o{@FilterOut} -e{@FilterErr} - -t{@InitTab} -T{@InitTabWidth} + "prg2lout -r -lEiffel" wantnumbered -i{@FilterIn} + -o{@FilterOut} -e{@FilterErr} + -t{@InitTab} -T{@InitTabWidth} } else @Yield { "cat" @FilterIn "|" pipe "|" - "prg2lout -r -lEiffel" -o{@FilterOut} + "prg2lout -r -lEiffel" wantnumbered -o{@FilterOut} -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} } } @@ -302,6 +321,23 @@ def @EiffelSetup } + def @PL # for formatting line numbers + right x + { + style @Case { + fixed @Yield fixedlinenumbersformat { + { linenumbers @Else fixedlinenumbers } @Font x + } + varying @Yield varyinglinenumbersformat { + { linenumbers @Else varyinglinenumbers } @Font x + } + symbol @Yield symbollinenumbersformat { + { linenumbers @Else symbollinenumbers } @Font x + } + } + } + + def @PA # for formatting asterisks { @PO @BackEnd @Case { @@ -347,7 +383,7 @@ def @EiffelSetup { @InitFontFamily Base @InitSize } @Font - { @InitLine lines } @Break @Body + { @InitLine lines nohyphen } @Break @Body @End @Eiffel |