create dictionary from given block or file, by getting all internal symbols
Parameters
dictionary source :string :block
Attributes
with | :block | embed given symbols |
raw | | create dictionary from raw block |
lower | | automatically convert all keys to lowercase |
Returns
Examples
copy
none: #[] ; none: []
a: #[
name: "John"
age: 34
]
; a: [name: "John", age: 34]
d: #[
name: "John"
print "we are in the block"
age: 34
print "yep"
]
; we are in the block
; yep
; d: [name: "John", age: 34]
copy
inspect fromBlock: #.raw [a b c d]
; [ :dictionary
; a : b :word
; c : d :word
; ]
copy
e: #.lower [
Name: "John"
suRnaMe: "Doe"
AGE: 35
]
; e: [name:John, surname:Doe, age:35]
Related