Commit 80a9e0ac authored by qrczak's avatar qrczak
Browse files

[project @ 2001-03-01 20:32:51 by qrczak]

#{stuff} is equivalent to #stuff except that it's self-delimited and
thus needs not to be placed at the end of line or in some brackets.
parent 0250da18
......@@ -243,6 +243,11 @@ tags:
<literal>() [] {} '' "" /* */</literal>. Any character may be
preceded by a backslash and will not be treated specially.</para>
<para<In addition <literal>#{stuff}</literal> is equivalent
to <literal>#stuff</literal> except that it's self-delimited
and thus needs not to be placed at the end of line or in some
brackets.</para>
<para>Meanings of specific keys:</para>
<variablelist>
......
-----------------------------------------------------------------------------
-- $Id: Main.hs,v 1.22 2001/02/22 22:39:56 qrczak Exp $
-- $Id: Main.hs,v 1.23 2001/03/01 20:32:51 qrczak Exp $
--
-- (originally "GlueHsc.hs" by Marcin 'Qrczak' Kowalczyk)
--
......@@ -22,7 +22,7 @@ import Char (ord, intToDigit, isSpace, isAlpha, isAlphaNum, toUpper)
import List (intersperse)
version :: String
version = "hsc2hs-0.64"
version = "hsc2hs-0.65"
data Flag
= Help
......@@ -145,6 +145,15 @@ special = do
pos <- getPosition
char '#'
skipMany (oneOf " \t")
keyArg pos <|> do
char '{'
skipMany (oneOf " \t")
sp <- keyArg pos
char '}'
return sp
keyArg :: SourcePos -> Parser Token
keyArg pos = do
key <- liftM2 (:) (letter <|> char '_') (many (alphaNum <|> char '_'))
<?> "hsc directive"
skipMany (oneOf " \t")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment