Skip to content

Commit 5dc96c7

Browse files
committed
ref: use pkg/shakar instead of internal sugar code
1 parent 4e6b79b commit 5dc96c7

File tree

22 files changed

+42
-88
lines changed

22 files changed

+42
-88
lines changed

ferus.nimble

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ requires "glfw >= 3.4.0.4"
3232
requires "whisky >= 0.1.3"
3333
requires "npeg >= 1.3.0"
3434
requires "webidl2nim >= 0.0.1"
35+
requires "shakar >= 0.1.3"
3536

3637
task niskriya, "Build Niskriya, the WebIDL to Nim source generator":
3738
exec "nim c --define:release --out:niskriya tools/niskriya.nim"

src/components/argparser.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import std/[os, parseopt, logging, tables, options]
2-
import ../components/shared/sugar
2+
import pkg/shakar
33

44
type Input* = object
55
arguments*: seq[string]

src/components/ipc/client/client.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import std/[os, net, options, sugar, times, sets], jsony
1+
import std/[os, net, options, sugar, times, sets]
2+
import pkg/jsony
23
import ../shared
34

45
when not defined(ferusInJail):

src/components/js/process.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import std/[logging, json, net]
22
import
3-
pkg/jsony,
3+
pkg/[jsony, shakar],
44
pkg/simdutf/base64,
55
pkg/bali/grammar/prelude,
66
pkg/bali/runtime/prelude,
77
pkg/bali/stdlib/console
88
import
9-
../../components/shared/[nix, sugar],
9+
../../components/shared/[nix],
1010
../../components/ipc/client/prelude,
1111
../../components/web/[window],
1212
../../components/web/document as jsdoc,

src/components/layout/processor.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
## Yoga-based layout engine
22
import std/[logging, strutils, tables, importutils, options]
3-
import pkg/[pixie, vmath, pretty]
3+
import pkg/[pixie, vmath, pretty, shakar]
44
import ../../bindings/yoga
55
import ../../components/parsers/html/document
66
import ../../components/parsers/css/[parser, anb, types]
77
import ../../components/style/[selector_engine, style_matcher, functions]
8-
import ../../components/shared/sugar
98
import ../../components/ipc/[client/prelude, shared]
109

1110
type

src/components/master/master.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
import std/[os, logging, osproc, strutils, options, net, sets, terminal, posix, tables]
66
import
7-
pkg/[jsony, pretty],
7+
pkg/[jsony, pretty, shakar],
88
pkg/sanchar/parse/url,
99
pkg/sanchar/proto/http/shared,
1010
pkg/simdutf/base64
1111

1212
import
13-
../../components/shared/[nix, sugar],
13+
../../components/shared/[nix],
1414
../../components/
1515
[network/ipc, renderer/ipc, parsers/html/ipc, parsers/html/document, js/ipc],
1616
../../components/web/cookie/parsed_cookie,

src/components/network/ipc.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import std/[options]
33
import pkg/sanchar/parse/url,
44
pkg/sanchar/proto/http/shared,
5-
pkg/simdutf/base64
6-
import ../../components/ipc/shared,
7-
../../components/shared/[sugar]
5+
pkg/simdutf/base64,
6+
pkg/[shakar]
7+
import ../../components/ipc/shared
88
#!fmt: on
99

1010
type

src/components/network/process.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import std/[strutils, sequtils, importutils, logging, options, os, json, net]
22
import
3-
pkg/[pretty, whisky, jsony],
3+
pkg/[pretty, whisky, jsony, shakar],
44
pkg/sanchar/[http, proto/http/shared],
55
pkg/sanchar/parse/url,
66
pkg/simdutf/base64
@@ -10,7 +10,7 @@ when defined(ferusUseCurl):
1010
import pkg/webby/httpheaders, pkg/curly #!fmt:on
1111

1212
import
13-
../../components/shared/[nix, sugar],
13+
../../components/shared/[nix],
1414
../../components/network/[websocket, types, ipc],
1515
../../components/build_utils,
1616
../../components/ipc/client/prelude

src/components/network/websocket.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
## WebSocket logic
22
## This currently uses the Whisky library, but there are plans to use a homegrown implementation sooner or later.
33
import std/[importutils, net]
4-
import pkg/[jsony, whisky]
4+
import pkg/[jsony, whisky, shakar]
55
import ../ipc/client/prelude
66
import ../js/ipc
7-
import ../shared/sugar
87
import ./[types, ipc]
98

109
privateAccess(WebSocket)

src/components/parsers/css/parser.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
#!fmt:off
12
import std/[strutils, tables, options]
2-
import stylus/[parser, shared, tokenizer], results
3-
import pkg/pretty
43
import ./[types, selector_parser, anb, keywords, units]
5-
import ../../shared/sugar
4+
import pkg/stylus/[parser, shared, tokenizer], pkg/[shakar, pretty, results]
5+
#!fmt:on
66

77
type CSSParser* = ref object
88
state*: Parser

0 commit comments

Comments
 (0)