mirror of
https://github.com/SymboScript/Book.git
synced 2024-11-24 14:16:24 +03:00
Update literals.md
This commit is contained in:
parent
c48f669975
commit
eb4dbc1362
1 changed files with 32 additions and 0 deletions
|
@ -1 +1,33 @@
|
|||
# Literals
|
||||
|
||||
In SymboScript exists only three kinds of token literals: strings, numbers, booleans.
|
||||
|
||||
## Strings
|
||||
|
||||
Strings are enclosed in double quotes, single quotes or backticks.
|
||||
|
||||
```ts
|
||||
"hello";
|
||||
"hello"`hello`;
|
||||
("hello\nworld");
|
||||
('hello"world');
|
||||
("hello ' world");
|
||||
```
|
||||
|
||||
## Numbers
|
||||
|
||||
```ts
|
||||
1 .1
|
||||
1.1
|
||||
1e1
|
||||
1E1
|
||||
1.1e1
|
||||
1.1E1
|
||||
```
|
||||
|
||||
## Booleans
|
||||
|
||||
```ts
|
||||
true;
|
||||
false;
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue