diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-28 21:19:21 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-28 21:23:26 +0100 |
commit | d91d1dda2ad1219b3b798eafc14151811ed9a1b3 (patch) | |
tree | f82d8da0763f0dbc62dedb2aa9aaa51114d2aad9 /src/css | |
parent | b035e53d641d71fab89f92cd8d5188501be0d058 (diff) | |
download | chawan-d91d1dda2ad1219b3b798eafc14151811ed9a1b3.tar.gz |
Compile with styleCheck:usages
much better
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/cssparser.nim | 6 | ||||
-rw-r--r-- | src/css/values.nim | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/css/cssparser.nim b/src/css/cssparser.nim index a825e94d..c63a7422 100644 --- a/src/css/cssparser.nim +++ b/src/css/cssparser.nim @@ -643,7 +643,7 @@ proc consumeDeclaration(state: var CSSParseState): Option[CSSDeclaration] = proc consumeListOfDeclarations(state: var CSSParseState): seq[CSSParsedItem] = while state.has(): let t = state.consume() - if t == CSS_wHITESPACE_TOKEN or t == CSS_SEMICOLON_TOKEN: + if t == CSS_WHITESPACE_TOKEN or t == CSS_SEMICOLON_TOKEN: continue elif t == CSS_AT_KEYWORD_TOKEN: state.reconsume() @@ -666,7 +666,7 @@ proc consumeListOfDeclarations(state: var CSSParseState): seq[CSSParsedItem] = proc consumeListOfDeclarations2(state: var CSSParseState): seq[CSSDeclaration] = while state.has(): let t = state.consume() - if t == CSS_wHITESPACE_TOKEN or t == CSS_SEMICOLON_TOKEN: + if t == CSS_WHITESPACE_TOKEN or t == CSS_SEMICOLON_TOKEN: continue elif t == CSS_AT_KEYWORD_TOKEN: state.reconsume() @@ -1001,4 +1001,4 @@ proc parseAnB*(cvals: seq[CSSComponentValue]): (Option[CSSAnB], int) = proc parseCSS*(inputStream: Stream): CSSRawStylesheet = if inputStream.atEnd(): return CSSRawStylesheet() - return inputstream.parseStylesheet() + return inputStream.parseStylesheet() diff --git a/src/css/values.nim b/src/css/values.nim index bd6bc549..db2f4475 100644 --- a/src/css/values.nim +++ b/src/css/values.nim @@ -68,7 +68,7 @@ type WHITESPACE_PRE_WRAP CSSFontStyle* = enum - FONTSTYLE_NORMAL, FONTSTYLE_ITALIC, FONTSTYLE_OBLIQUE + FONT_STYLE_NORMAL, FONT_STYLE_ITALIC, FONT_STYLE_OBLIQUE CSSPosition* = enum POSITION_STATIC, POSITION_RELATIVE, POSITION_ABSOLUTE, POSITION_FIXED, @@ -186,7 +186,7 @@ type content*: seq[CSSContent] of VALUE_QUOTES: quotes*: CSSQuotes - of VALUE_WHITESPACE: + of VALUE_WHITE_SPACE: whitespace*: CSSWhitespace of VALUE_INTEGER: integer*: int @@ -811,9 +811,9 @@ func cssDisplay(cval: CSSComponentValue): Opt[CSSDisplay] = func cssFontStyle(cval: CSSComponentValue): Opt[CSSFontStyle] = const FontStyleMap = { - "normal": FONTSTYLE_NORMAL, - "italic": FONTSTYLE_ITALIC, - "oblique": FONTSTYLE_OBLIQUE + "normal": FONT_STYLE_NORMAL, + "italic": FONT_STYLE_ITALIC, + "oblique": FONT_STYLE_OBLIQUE } return cssIdent(FontStyleMap, cval) |