diff options
| author | meza <meza@student.chalmers.se> | 2008-04-29 13:05:24 +0000 |
|---|---|---|
| committer | meza <meza@student.chalmers.se> | 2008-04-29 13:05:24 +0000 |
| commit | 314f147bff04c3b02e0f43b77e4b7a3f1fd9e433 (patch) | |
| tree | e4aef58509c94c4b578a1a715f550beb621c9fed /src/GF/JavaScript/LexJS.hs | |
| parent | ba6a2b5d6ec8d22136f1a5e985a8f77e70379c2c (diff) | |
JS.cf : Changed the JS grammar to support strings as property names in objects. Changed pretty much all the files in the same folder as well as GFCCToJS.hs and SISR.hs to reflect the changes.
Diffstat (limited to 'src/GF/JavaScript/LexJS.hs')
| -rw-r--r-- | src/GF/JavaScript/LexJS.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/GF/JavaScript/LexJS.hs b/src/GF/JavaScript/LexJS.hs index 797f6ab5d..242831195 100644 --- a/src/GF/JavaScript/LexJS.hs +++ b/src/GF/JavaScript/LexJS.hs @@ -114,19 +114,19 @@ alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1 alexMove (Pn a l c) _ = Pn (a+1) l (c+1) type AlexInput = (Posn, -- current position, - Char, -- previous char - String) -- current input string + Char, -- previous char + String) -- current input string tokens :: String -> [Token] tokens str = go (alexStartPos, '\n', str) where go :: (Posn, Char, String) -> [Token] go inp@(pos, _, str) = - case alexScan inp 0 of - AlexEOF -> [] - AlexError (pos, _, _) -> [Err pos] - AlexSkip inp' len -> go inp' - AlexToken inp' len act -> act pos (take len str) : (go inp') + case alexScan inp 0 of + AlexEOF -> [] + AlexError (pos, _, _) -> [Err pos] + AlexSkip inp' len -> go inp' + AlexToken inp' len act -> act pos (take len str) : (go inp') alexGetChar :: AlexInput -> Maybe (Char,AlexInput) alexGetChar (p, c, []) = Nothing |
