modern: more syntax fixes
parent
8a46a16530
commit
25a8cedcb8
|
@ -60,7 +60,7 @@ unit-test
|
|||
{ } [ \ duplex-stream see ] unit-test
|
||||
|
||||
{ "[ \\ + ]" } [ [ \ + ] unparse ] unit-test
|
||||
{ "[ \\ [ ]" } [ [ \ [ ] unparse ] unit-test
|
||||
{ "[ \\ [ ]" } [ [ \ \[ ] unparse ] unit-test
|
||||
|
||||
{ t } [
|
||||
100 \ dup <array> unparse-short
|
||||
|
@ -305,7 +305,9 @@ INTERSECTION: intersection-see-test sequence number ;
|
|||
{ } [ \ compose see ] unit-test
|
||||
{ } [ \ curry see ] unit-test
|
||||
|
||||
{ "postpone: \[" } [ \ [ unparse ] unit-test
|
||||
{ "postpone: \[" } [
|
||||
\ \[ unparse
|
||||
] unit-test
|
||||
|
||||
TUPLE: started-out-hustlin ;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ ARTICLE: "tuple-declarations" "Tuple slot declarations"
|
|||
{ $list
|
||||
"class declaration: values must satisfy the class predicate"
|
||||
{ "whether a slot is read only or not (" { $link read-only } ")" }
|
||||
{ "an initial value (" { $link \ initial: } ")" }
|
||||
{ "an initial value (" { $link \ \initial: } ")" }
|
||||
}
|
||||
{ $subsections
|
||||
"slot-read-only-declaration"
|
||||
|
|
|
@ -244,7 +244,7 @@ CONSTANT: case-const-2 2
|
|||
{ \ * [ "times" ] }
|
||||
{ \ / [ "divide" ] }
|
||||
{ \ ^ [ "power" ] }
|
||||
{ \ [ [ "obama" ] }
|
||||
{ \ \[ [ "obama" ] }
|
||||
} case ;
|
||||
|
||||
\ test-case-7 def>> must-infer
|
||||
|
|
|
@ -65,7 +65,7 @@ IN: locals.parser.tests
|
|||
[
|
||||
"locals" use-vocab
|
||||
{ "99 :> kkk kkk ;" } <lexer> [
|
||||
H{ } clone [ \ ; parse-until ] with-lambda-scope
|
||||
H{ } clone [ \ \; parse-until ] with-lambda-scope
|
||||
] with-lexer
|
||||
] with-compilation-unit unparse
|
||||
] unit-test
|
||||
|
|
|
@ -62,7 +62,7 @@ $nl
|
|||
{ $see-also "slots" "mirrors" } ;
|
||||
|
||||
ARTICLE: "slot-initial-values" "Initial values of slots"
|
||||
"An initial value for a slot can be specified with the " { $link \ initial: } " slot declaration attribute. For certain classes, the initial value is optional; in these cases, it does not need to be specified. For others, it is required. Initial values can be used independently of class declaration, but if specified, the value must satisfy the class predicate."
|
||||
"An initial value for a slot can be specified with the " { $link \ \initial: } " slot declaration attribute. For certain classes, the initial value is optional; in these cases, it does not need to be specified. For others, it is required. Initial values can be used independently of class declaration, but if specified, the value must satisfy the class predicate."
|
||||
$nl
|
||||
"The following classes have default initial values:"
|
||||
{ $table
|
||||
|
@ -77,7 +77,7 @@ $nl
|
|||
{ $list
|
||||
{ "If the class is a union or mixin class which " { $emphasis "contains" } " one of the above known classes, then the initial value of the class is that of the known class, with preference given to classes earlier in the list. For example, if the slot is declared " { $link object } " (this is the default), the initial value is " { $link f } ". Similarly for " { $link sequence } " and " { $link assoc } "." }
|
||||
{ "If the class is a tuple class, the initial value of the slot is a new, shared instance of the class created with " { $link new } "." }
|
||||
{ "Otherwise, a " { $link bad-initial-value } " error is thrown. In this case, an initial value must be specified explicitly using " { $link \ initial: } "." }
|
||||
{ "Otherwise, a " { $link bad-initial-value } " error is thrown. In this case, an initial value must be specified explicitly using " { $link \ \initial: } "." }
|
||||
}
|
||||
"A word can be used to check if a class has an initial value or not:"
|
||||
{ $subsections initial-value } ;
|
||||
|
|
|
@ -767,7 +767,7 @@ $nl
|
|||
{ { $snippet "{ name attributes... }" } " - a slot which can hold any object, with optional attributes" }
|
||||
{ { $snippet "{ name class attributes... }" } " - a slot specialized to a specific class, with optional attributes" }
|
||||
}
|
||||
"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link \ initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." }
|
||||
"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link \ \initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." }
|
||||
{ $examples
|
||||
"A simple tuple class:"
|
||||
{ $code "TUPLE: color red green blue ;" }
|
||||
|
@ -791,7 +791,7 @@ HELP: read-only
|
|||
{ $values { "slot" "a slot name" } }
|
||||
{ $description "Defines a tuple slot to be read-only. If a tuple has read-only slots, instances of the tuple should only be created by calling " { $link boa } ", instead of " { $link new } ". Using " { $link boa } " is the only way to set the value of a read-only slot." } ;
|
||||
|
||||
{ initial: read-only } related-words
|
||||
{ \initial: read-only } related-words
|
||||
|
||||
HELP: \SLOT:
|
||||
{ $syntax "SLOT: name" }
|
||||
|
|
|
@ -82,7 +82,7 @@ HELP: \--[
|
|||
{ "head" object }
|
||||
{ "edge" edge }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <edge> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that undirected " { $link graph } "s read more like graphs in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <edge> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that undirected " { $link graph } "s read more like graphs in the DOT language." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
{ $code
|
||||
|
@ -108,7 +108,7 @@ HELP: \->[
|
|||
{ "head" object }
|
||||
{ "edge" edge }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <edge> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that directed " { $link graph } "s read more like digraphs in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <edge> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that directed " { $link graph } "s read more like digraphs in the DOT language." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
{ $code
|
||||
|
@ -134,7 +134,7 @@ HELP: \add-edge[
|
|||
{ "head" object }
|
||||
{ "edge" edge }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <edge> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that setting an " { $link edge } "'s " { $slot "attributes" } " reads more like the equivalent in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <edge> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that setting an " { $link edge } "'s " { $slot "attributes" } " reads more like the equivalent in the DOT language." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
{ $code
|
||||
|
@ -153,7 +153,7 @@ HELP: \add-edge[
|
|||
"}"
|
||||
}
|
||||
$nl
|
||||
"This has the advantage over " { $link \ --[ } " and " { $link \ ->[ } " of reading nicely for both directed " { $emphasis "and" } " undirected " { $link graph } "s."
|
||||
"This has the advantage over " { $link \ \--[ } " and " { $link \ \->[ } " of reading nicely for both directed " { $emphasis "and" } " undirected " { $link graph } "s."
|
||||
} ;
|
||||
|
||||
HELP: \add-node[
|
||||
|
@ -161,7 +161,7 @@ HELP: \add-node[
|
|||
{ "id" object }
|
||||
{ "node" node }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <node> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that setting a " { $link node } "'s " { $slot "attributes" } " reads more like the equivalent in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <node> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that setting a " { $link node } "'s " { $slot "attributes" } " reads more like the equivalent in the DOT language." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
{ $code
|
||||
|
@ -185,7 +185,7 @@ HELP: \edge[
|
|||
{ $values
|
||||
{ "attrs" edge-attributes }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <edge-attributes> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that adding " { $link edge-attributes } " to a " { $link graph } " or " { $link subgraph } " reads more like the equivalent in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <edge-attributes> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that adding " { $link edge-attributes } " to a " { $link graph } " or " { $link subgraph } " reads more like the equivalent in the DOT language." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
{ $code
|
||||
|
@ -209,7 +209,7 @@ HELP: \graph[
|
|||
{ $values
|
||||
{ "attrs" graph-attributes }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <graph-attributes> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that adding " { $link graph-attributes } " to a " { $link graph } " or " { $link subgraph } " reads more like the equivalent in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <graph-attributes> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that adding " { $link graph-attributes } " to a " { $link graph } " or " { $link subgraph } " reads more like the equivalent in the DOT language." }
|
||||
{ $notes "This word is rendered redundant by the " { $link graph } " and " { $link subgraph } " methods defined by " { $vocab-link "graphviz.notation" } " for setting attributes. Sometimes it still might look better to delineate certain attribute-setting code." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
|
@ -248,7 +248,7 @@ HELP: \node[
|
|||
{ $values
|
||||
{ "attrs" node-attributes }
|
||||
}
|
||||
{ $description "Shorthand for " { $link <node-attributes> } " to be used with " { $link \ ] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that adding " { $link node-attributes } " to a " { $link graph } " or " { $link subgraph } " reads more like the equivalent in the DOT language." }
|
||||
{ $description "Shorthand for " { $link <node-attributes> } " to be used with " { $link \ \] } " and attribute-setting generic words (see " { $link { "graphviz.notation" "=attrs" } } ") so that adding " { $link node-attributes } " to a " { $link graph } " or " { $link subgraph } " reads more like the equivalent in the DOT language." }
|
||||
{ $examples
|
||||
"Instead of writing"
|
||||
{ $code
|
||||
|
|
|
@ -23,7 +23,7 @@ HELP: \PY-QUALIFIED-FROM:
|
|||
{ "name-effects" "pairs of names and effect declarations of bindings to import" }
|
||||
}
|
||||
{ $description
|
||||
"Like " { $link \ PY-FROM: } " except all words are created with module as the given prefix."
|
||||
"Like " { $link \ \PY-FROM: } " except all words are created with module as the given prefix."
|
||||
} ;
|
||||
|
||||
HELP: \PY-METHODS:
|
||||
|
@ -46,7 +46,7 @@ HELP: \PY-METHODS:
|
|||
|
||||
ARTICLE: "python.syntax" "Syntax for python calls from factor"
|
||||
"The " { $vocab-link "python.syntax" } " vocab adds syntax to factor to make calls from factor to python natural and intuitive."
|
||||
{ $subsections \ PY-FROM: \ PY-QUALIFIED-FROM: \ PY-METHODS: }
|
||||
{ $subsections \ \PY-FROM: \ \PY-QUALIFIED-FROM: \ \PY-METHODS: }
|
||||
$nl
|
||||
{ $examples "Here is how you bind and call a method namelist on a ZipFile instance created by importing the zipfile module:"
|
||||
{ $code
|
||||
|
|
|
@ -15,7 +15,7 @@ $nl
|
|||
{ { $snippet "{ name attributes... }" } " - a slot which can hold any object, with optional attributes" }
|
||||
{ { $snippet "{ name class attributes... }" } " - a slot specialized to a specific class, with optional attributes" }
|
||||
}
|
||||
"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link \ initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
|
||||
"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link \initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
|
||||
|
||||
HELP: \ROLE-TUPLE:
|
||||
{ $syntax "ROLE-TUPLE: name slots ;
|
||||
|
@ -31,7 +31,7 @@ $nl
|
|||
{ { $snippet "{ name attributes... }" } " - a slot which can hold any object, with optional attributes" }
|
||||
{ { $snippet "{ name class attributes... }" } " - a slot specialized to a specific class, with optional attributes" }
|
||||
}
|
||||
"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link \ initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
|
||||
"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link \initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
|
||||
|
||||
{
|
||||
postpone: \ROLE:
|
||||
|
|
Loading…
Reference in New Issue