;; @module errors.lsp
;; @description examples of (erroneous code) highlighting
;; @author Cyril Slobin @link http://slobin.pp.ru/ slobin
;; @user keywords are supported too

; FIXME: Unbalanced right parenthesis

  )

; If a nested left parenthesis occurs in the first column,
; the previous definition is probably not properly closed

(define (square x) (* x x)
(define (cube x) (* x x x))

; Numbers

0 1 999 0647 0xDeadBeef +1 -1 
1+1 1error 09 0xerror

; Floats

1. .1 1.1 1e1 1.e1 .1e1 1.1e1 +1.1e-1
1.1.1e1

; Strings

"backslash \\ quote \" tab \t
cr \r lf \n dec \065 hex \x41" ; line break in string

"bad escapes \a \b \c \65"

{balanced {like this} braces}  ; balanced string ends here
[text]anyting \r\n goes[/text] ; long string ends here

error} error]

; Obsolete functions (new in upcoming newLISP 10.x release)

assoc-set nth-set ref-set replace-assoc set-assoc set-nth

# That's all! By the way, the hash sign may start comments