Syntax
These pages show how to write Novis code. Each page explains one part of the language with an example that you can run.
If you are new to Novis, read Start here first. Then read the groups in this order, or go to the one you need:
- Basics: files, statements, comments, variables and constants.
- Values and types: numbers, strings, arrays,
null, enums, and how to convert and test types. - Operators: arithmetic, comparison,
??, string operators and the pipeline|>. - Control flow:
if,match,switch, loops and generators. - Errors:
throw,try,catch, the error classes and the limits of a program. - Functions: declaring and calling functions, parameters and anonymous functions.
- Classes and objects: classes, properties, methods, interfaces and shapes.
- Programs and files: namespaces,
autoload,requireand file paths. - Concurrency: tasks that run at the same time, channels and separate programs.
- Attributes: data on a declaration, JSON, routes and commands.
- Testing: tests, fixtures, data rows and assertions.
To look up a single class or function, use Reference.
