▼
Abstract Syntax Tree
1
BSL Tree Tests
2
BSL-
Error-
Tests
3
Quiz-
Mode
4
Internationalization
5
JSON-
Tree Tests
6
Stepper Tests
7
Build your own Grammar!
►
1
BSL Tree Tests
1.1
Constant Definition
1.2
Struct Definition
1.3
Function Definition
1.4
Conditional Expression
1.5
Function Call Expression
1.6
List Expression
1.7
Name Expression
1.8
Value Expressions
On this page:
1.1
Constant Definition
1.2
Struct Definition
1.3
Function Definition
1.4
Conditional Expression
1.5
Function Call Expression
1.6
List Expression
1.7
Name Expression
1.8
Value Expressions
contents
← prev
up
next →
1
BSL Tree Tests
1.1
Constant Definition
(define one 2) (define two 3) (+ one two)
1.2
Struct Definition
(define-struct pool (people fish water)) (make-pool 2 1 "a lot")
1.3
Function Definition
(define (swim-with-the-fish pool) (string-append "Cool pool with a number of:" (number-string (pool-fish pool))))
1.4
Conditional Expression
(cond [(< 1 0) "Chocolate is the best"] [(< 0 0) "But Ice Cream is way better!"] [(> 1000 200) "Still Pizza's the best!!!"] [else #f])
1.5
Function Call Expression
(swim-with-the-fish (make-pool 2 20 "a little less than much, but still much"))
1.6
List Expression
(list 1 2 3 4 5)
1.7
Name Expression
just-a-normal-name
1.8
Value Expressions
#t
42
"Hallo Welt"
'()
contents
← prev
up
next →