Liking cljdoc? Tell your friends :D

hara.code.block.type


*tab-width*clj


block-compareclj

(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
raw docstring

comment-blockclj

(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}
raw docstring

comment-block?clj

(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
raw docstring

container-blockclj

(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))
raw docstring

container-block?clj

(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
raw docstring

container-heightclj

(container-height block)

calculates the height of a container

(container-height (construct/block [(construct/newline) (construct/newline)])) => 2

calculates the height of a container

(container-height (construct/block [(construct/newline)
                                    (construct/newline)]))
=> 2
raw docstring

container-stringcljmultimethod

returns 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]"
raw docstring

container-value-stringclj

(container-value-string block)

returns the string for

(container-value-string (construct/block [::a :b :c])) => "[:hara.code.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]))
=> "[:hara.code.block.type-test/a :b :c]"

(container-value-string (parse/parse-string "[::a :b :c]"))
=> "[(keyword \":a\") (keyword \"b\") (keyword \"c\")]"
raw docstring

container-widthclj

(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
raw docstring

eof-block?clj

(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
raw docstring

linebreak-block?clj

(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
raw docstring

linespace-block?clj

(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
raw docstring

modifier-blockclj

(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))
raw docstring

modifier-block?clj

(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
raw docstring

nil-void?clj

(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
raw docstring

space-block?clj

(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
raw docstring

token-blockclj

(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}
raw docstring

token-block?clj

(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
raw docstring

void-blockclj

(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}
raw docstring

void-block?clj

(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
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close