Gauntlet Documentation
  • 🏠Welcome
  • πŸ…Getting Started
    • 🧠Introduction To Gauntlet
  • ‼️Read before Proceeding
  • ⬇️Installation
  • πŸ‘¨β€πŸ’»VSCode Extension
  • πŸ“šBasics
    • πŸ’¨Running Gauntlet
    • πŸ“„File Setup & Hello World
  • πŸ” Scope Variables
  • πŸ–ΌοΈConstants
  • 🧩Functions
  • ↔️If Statements
  • πŸ”‘Ternary Operator
  • πŸ’ Switch-Case
  • πŸ“©Select-Case
  • ➰Loops
  • πŸ“Structs
  • 🧱Interfaces
  • πŸͺͺAliases
  • πŸ“ŽMethods
  • πŸ¦™Lambdas
  • πŸ•ΈοΈMiscellaneous
  • ⚑Advanced Features
    • πŸ”€When-Cases
    • 🚰Pipes
    • ⁉️Try-Statements
    • 🎭Force-Statements
    • 🌯Wrapper Types
Powered by GitBook
On this page
  • Transpiling Code
  • Example
  • Run Immediately After Transpiling
  • Example
  • Skipping formatting
  • Example
Export as PDF
  1. Basics

Running Gauntlet

All Gauntlet files end in .gaunt

Transpiling Code

To transpile Gauntlet code to Go code, simply provide the target .gaunt file. If no errors are found, Gauntlet will put your transpiled code in a .go file (in the same folder as your Gauntlet one) with the corresponding name. In the example below, the file name is MyTestFile.gaunt, which means MyTestFile.go will contain the resulting code.

Example

./gauntlet MyTestFile.gaunt
.\gauntlet.exe MyTestFile.gaunt

Run Immediately After Transpiling

You can run your transpiled code immediately after it's created by utilizing the run command.

Example

./gauntlet MyTestFile.gaunt run 
.\gauntlet MyTestFile.gaunt run 

Skipping formatting

By default, your transpiled code will be formatted with go fmt. If, for some reason, you don't want this, you can stop it from happening with the --no-format flag.

Example

./gauntlet MyTestFile.gaunt run --no-format
.\gauntlet MyTestFile.gaunt run --no-format

-OR-

./gauntlet MyTestFile.gaunt --no-format
.\gauntlet MyTestFile.gaunt --no-format

PreviousVSCode ExtensionNextFile Setup & Hello World

Last updated 6 days ago

πŸ“š
πŸ’¨