TokenCss¶
CSS Support for ITU+TU files in HTML.
-
cpip.TokenCss.
ENUM_TT_MAP
= {'m': 'keyword', 'i': 'concat', 'g': 'non-whitespace', 'n': 'preprocessing-directive', 'h': 'whitespace', 'l': 'C++ comment', 'd': 'character-literal', 'k': 'C comment', 'a': 'header-name', 'f': 'preprocessing-op-or-punc', 'o': 'Unknown', 'c': 'pp-number', 'j': 'trigraph', 'e': 'string-literal', 'b': 'identifier'}¶ Reverse map of {enum_int : token_type, ...}
-
cpip.TokenCss.
TT_ENUM_MAP
= {'header-name': 'a', 'preprocessing-directive': 'n', 'pp-number': 'c', 'non-whitespace': 'g', 'concat': 'i', 'identifier': 'b', 'keyword': 'm', 'character-literal': 'd', 'C++ comment': 'l', 'whitespace': 'h', 'preprocessing-op-or-punc': 'f', 'string-literal': 'e', 'Unknown': 'o', 'trigraph': 'j', 'C comment': 'k'}¶ Map of {token_type : enum_int, ...}
-
cpip.TokenCss.
retClass
(theTt)¶ Parameters: theTt ( str
) – Token typeReturns: str
– CSS class.Raises: ExceptionTokenCss
For unknown token type.
-
cpip.TokenCss.
writeCssForFile
(theFile)¶ Writes the CSS file into to the directory that the file is in.
-
cpip.TokenCss.
writeCssToDir
(theDir)¶ Writes the CSS file into to the directory.
Parameters: theDir ( str
) – Directory.Returns: NoneType