Skip to content

Commit

Permalink
added paragraph about syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
WeirdConstructor committed Jul 19, 2020
1 parent 618edd3 commit d54491e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/wlambda_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5363,6 +5363,20 @@ Syntax](#132-string-formatting-syntax). It is basically the Rust `std::fmt`
Syntax with a few extensions for WLambda data types and the dynamically typed
nature of WLambda.

The WLambda syntax for `$F` is: `$F string-literal`. This means, you can
use any WLambda string literal after `$F`:

```wlambda
$F"..."; # normal string
$F$b"..."; # byte vector
$F$q/.../; # normal string, quote syntax
$F$Q"..."; # byte vector quote syntax
$F$code{ }; # code block string
```

(Please note, that `$code{ ... }` is not as useful in this context, because
the formatter placeholders usually are not valid WLambda syntax.)

This is a very simple example:

```wlambda
Expand Down
14 changes: 14 additions & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5377,6 +5377,20 @@ Syntax](#132-string-formatting-syntax). It is basically the Rust `std::fmt`
Syntax with a few extensions for WLambda data types and the dynamically typed
nature of WLambda.
The WLambda syntax for `$F` is: `$F string-literal`. This means, you can
use any WLambda string literal after `$F`:
```wlambda
$F"..."; # normal string
$F$b"..."; # byte vector
$F$q/.../; # normal string, quote syntax
$F$Q"..."; # byte vector quote syntax
$F$code{ }; # code block string
```
(Please note, that `$code{ ... }` is not as useful in this context, because
the formatter placeholders usually are not valid WLambda syntax.)
This is a very simple example:
```wlambda
Expand Down

0 comments on commit d54491e

Please sign in to comment.