Safe Haskell | None |
---|---|
Language | Haskell2010 |
Common code generation utility functions
- moduleNameToJs :: ModuleName -> Text
- identToJs :: Ident -> Text
- properToJs :: Text -> Text
- identNeedsEscaping :: Text -> Bool
- identCharToText :: Char -> Text
- nameIsJsReserved :: Text -> Bool
- nameIsJsBuiltIn :: Text -> Bool
- jsAnyReserved :: [Text]
- jsKeywords :: [Text]
- jsSometimesReserved :: [Text]
- jsFutureReserved :: [Text]
- jsFutureReservedStrict :: [Text]
- jsOldReserved :: [Text]
- jsLiterals :: [Text]
Documentation
moduleNameToJs :: ModuleName -> Text Source #
properToJs :: Text -> Text Source #
identNeedsEscaping :: Text -> Bool Source #
Test if a string is a valid AST identifier without escaping.
identCharToText :: Char -> Text Source #
Attempts to find a human-readable name for a symbol, if none has been specified returns the ordinal value.
nameIsJsReserved :: Text -> Bool Source #
Checks whether an identifier name is reserved in JavaScript.
nameIsJsBuiltIn :: Text -> Bool Source #
Checks whether a name matches a built-in value in JavaScript.
jsAnyReserved :: [Text] Source #
jsKeywords :: [Text] Source #
jsSometimesReserved :: [Text] Source #
jsFutureReserved :: [Text] Source #
jsOldReserved :: [Text] Source #
jsLiterals :: [Text] Source #