syntax: add ` `` ``` ````
parent
6206ef7777
commit
174a1f2695
|
@ -12,6 +12,7 @@ IN: bootstrap.syntax
|
|||
":"
|
||||
";"
|
||||
"--"
|
||||
"`" "``" "```" "````"
|
||||
"![[" "![=[" "![==["
|
||||
"[[" "[=[" "[==["
|
||||
"factor[[" "factor[=[" "factor[==["
|
||||
|
|
|
@ -87,6 +87,23 @@ IN: bootstrap.syntax
|
|||
"]==]" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
|
||||
"`" [
|
||||
scan-token suffix!
|
||||
] define-core-syntax
|
||||
|
||||
"``" [
|
||||
"``" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
"```" [
|
||||
"```" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
"````" [
|
||||
"````" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
! Different from parse-multiline-string
|
||||
"factor\"" [
|
||||
lexer get skip-blank parse-string suffix!
|
||||
|
@ -427,4 +444,5 @@ IN: bootstrap.syntax
|
|||
[ subwords [ changed-definition ] each ]
|
||||
[ parse-definition { } like set-specializer ] tri
|
||||
] define-core-syntax
|
||||
|
||||
] with-compilation-unit
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
USING: help.markup help.syntax io.encodings.utf8 strings ;
|
||||
IN: backticks
|
||||
|
||||
HELP: `
|
||||
{ $syntax "` command [args]`" }
|
||||
HELP: \ shell``
|
||||
{ $syntax "shell`` command [args]``" }
|
||||
{ $description "Runs the specified command and captures the output as a " { $link utf8 } " encoded " { $link string } "." }
|
||||
{ $examples
|
||||
{ $unchecked-example
|
||||
"` ls -l`"
|
||||
"shell`` ls -l``"
|
||||
"total 45\ndrwxrwxr-x+ 61 root admin 2074 Apr 8 22:58 Applic..."
|
||||
}
|
||||
} ;
|
||||
|
|
|
@ -4,8 +4,8 @@ USING: fry io io.encodings.utf8 interpolate io.launcher
|
|||
multiline sequences ;
|
||||
IN: backticks
|
||||
|
||||
SYNTAX: \ `
|
||||
"`" parse-multiline-string '[
|
||||
SYNTAX: \ shell``
|
||||
"``" parse-multiline-string '[
|
||||
_ interpolate>string
|
||||
utf8 [ contents ] with-process-reader
|
||||
] append! ;
|
||||
|
|
Loading…
Reference in New Issue