Table of contents
Getting Started
Installation
Usage
FAQ
Testing
What's new
Migration Guide
Basic Syntax
Data Types
Expressions
Variables
Conditions
Commands
Arrays
Loops
Functions
Importing
Advanced Syntax
As Cast
Builtins
Type Condition
Compiler Flags
Standard Library
Array
Date
Environment
FileSystem
HTTP
Math
Test
Text
Contributing
How to
Guide
Compiler structure
Amber by Example
Backup Rotator
ShellCheck tester
Ubuntu Updater
Bot Detector
LSP Installer
Press
Compiler Flags
Compiler flags enable customization of the compiler’s behavior within the scope of a specific function. These flags are particularly useful for managing edge cases by temporarily relaxing certain restrictions. Below is a list of available compiler flags and their functions:
allow_nested_if_else- Disables warnings that recommend using specialized if-chain syntax.allow_absurd_cast- Turns off warnings about the potential for nonsensical results when using force-type casting, which may result in an absurd cast.allow_camel_case- Suppresses warnings about identifiers not being written insnake_case.allow_dead_code- Disables warnings about unreachable code blocks, such as statically determinediforelsebranches.allow_public_mutable- Suppresses errors when creating mutablepub letvariables instead ofpub const, allowing you to share global state across modules.
#[allow_nested_if_else]
fun foo() {
// ...
}
Table of contents
Getting Started
Installation
Usage
FAQ
Testing
What's new
Migration Guide
Basic Syntax
Data Types
Expressions
Variables
Conditions
Commands
Arrays
Loops
Functions
Importing
Advanced Syntax
As Cast
Builtins
Type Condition
Compiler Flags
Standard Library
Array
Date
Environment
FileSystem
HTTP
Math
Test
Text
Contributing
How to
Guide
Compiler structure
Amber by Example
Backup Rotator
ShellCheck tester
Ubuntu Updater
Bot Detector
LSP Installer
Press