(block-compare this other)compares equality of two blocks
(block-compare (construct/void \space) (construct/void \space)) => 0
compares equality of two blocks
(block-compare (construct/void \space)
(construct/void \space))
=> 0(code-block? block)checks if a block can be representated as code
checks if a block can be representated as code
(comment-block string)constructs a comment block
(-> (comment-block ";hello") (base/block-info)) => {:type :comment, :tag :comment, :string ";hello", :height 0, :width 6}
constructs a comment block
(-> (comment-block ";hello")
(base/block-info))
=> {:type :comment, :tag :comment, :string ";hello", :height 0, :width 6}(comment-block? block)checks if the block is a token block
(comment-block? (construct/comment ";;hello")) => true
checks if the block is a token block (comment-block? (construct/comment ";;hello")) => true
(container-block tag children props)constructs a container block
(-> (container-block :fn [(construct/token '+) (construct/void) (construct/token '1)] (construct/container-props :fn)) (base/block-value)) => '(fn* [] (+ 1))
constructs a container block
(-> (container-block :fn [(construct/token '+)
(construct/void)
(construct/token '1)]
(construct/*container-props* :fn))
(base/block-value))
=> '(fn* [] (+ 1))(container-block? block)checks if block is a container block
(container-block? (construct/block [])) => true
checks if block is a container block (container-block? (construct/block [])) => true
(container-height block)calculates the height of a container
(container-height (construct/block [])) => 0
(container-height (construct/block [(construct/newline)])) => 1
(container-height (construct/block [(construct/newline) (construct/newline)])) => 2
calculates the height of a container
(container-height (construct/block []))
=> 0
(container-height (construct/block [(construct/newline)]))
=> 1
(container-height (construct/block [(construct/newline)
(construct/newline)]))
=> 2returns the string for the container
(container-string (construct/block [1 2 3])) => "[1 2 3]"
returns the string for the container (container-string (construct/block [1 2 3])) => "[1 2 3]"
(container-value-string block)returns the string for
(container-value-string (construct/block [::a :b :c])) => "[:std.block.type-test/a :b :c]"
(container-value-string (parse/parse-string "[::a :b :c]")) => "[(keyword ":a") (keyword "b") (keyword "c")]"
returns the string for (container-value-string (construct/block [::a :b :c])) => "[:std.block.type-test/a :b :c]" (container-value-string (parse/parse-string "[::a :b :c]")) => "[(keyword \":a\") (keyword \"b\") (keyword \"c\")]"
(container-width block)calculates the width of a container
(container-width (construct/block [1 2 3 4])) => 9
calculates the width of a container (container-width (construct/block [1 2 3 4])) => 9
(eof-block? block)checks if input is an eof block
(eof-block? (construct/void nil)) => true
checks if input is an eof block (eof-block? (construct/void nil)) => true
(linebreak-block? block)checks if block is of type :linebreak
(linebreak-block? (construct/newline)) => true
checks if block is of type :linebreak (linebreak-block? (construct/newline)) => true
(linespace-block? block)checks if block is of type :linespace
(linespace-block? (construct/space)) => true
checks if block is of type :linespace (linespace-block? (construct/space)) => true
(modifier-block tag string command)creates a modifier block, specifically #_
(modifier-block :hash-uneval "#_" (fn [acc _] acc))
creates a modifier block, specifically #_ (modifier-block :hash-uneval "#_" (fn [acc _] acc))
(modifier-block? block)checks if block is a modifier block
(modifier-block? (construct/uneval)) => true
checks if block is a modifier block (modifier-block? (construct/uneval)) => true
(nil-void? block)checks if block is nil or type void block
(nil-void? nil) => true
(nil-void? (construct/block nil)) => false
(nil-void? (construct/space)) => true
checks if block is nil or type void block (nil-void? nil) => true (nil-void? (construct/block nil)) => false (nil-void? (construct/space)) => true
(space-block? block)checks if block is of type \space
(space-block? (construct/space)) => true
checks if block is of type \space (space-block? (construct/space)) => true
(token-block tag string value value-string width height)creates a token block
(base/block-info (token-block :symbol "abc" 'abc "abc" 3 0)) => {:type :token, :tag :symbol, :string "abc", :height 0, :width 3}
creates a token block
(base/block-info (token-block :symbol "abc" 'abc "abc" 3 0))
=> {:type :token, :tag :symbol, :string "abc", :height 0, :width 3}(token-block? block)checks if the block is a token block
(token-block? (construct/token "hello")) => true
checks if the block is a token block (token-block? (construct/token "hello")) => true
(void-block tag ch width height)constructs a void block
(-> (void-block :linespace \tab 1 0) (base/block-info)) => {:type :void, :tag :linespace, :string "\t", :height 0, :width 1}
constructs a void block
(-> (void-block :linespace \tab 1 0)
(base/block-info))
=> {:type :void, :tag :linespace, :string "\t", :height 0, :width 1}(void-block? block)checks if the block is a void block
(void-block? (construct/void)) => true
checks if the block is a void block (void-block? (construct/void)) => true
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |