Skip to content

Instantly share code, notes, and snippets.

@Azoraqua
Last active August 29, 2018 22:55
Show Gist options
  • Save Azoraqua/95bd3ff741c917b155517bfd320cffb3 to your computer and use it in GitHub Desktop.
Save Azoraqua/95bd3ff741c917b155517bfd320cffb3 to your computer and use it in GitHub Desktop.
Grammar for QAML.
###
The code below repesents a section in the configuration.
###
section database {
var (host) = '127.0.0.1' % The host.
var (username) = 'root' % The username.
var (password) = 'admin' % The password.
var (schema) = 'test' % The schema.
var (options) % The options (Not initialized so it's 'null').
}
section messages {
var !(connected) = "Connected at {{database.host}} with username {{database.username}} and password @repeat(@length({{database.password}}), '*') on schema {{database.schema}}."
var !(disconnected) = "Disconnected from the database."
}
###
The code below represents another section in the configuration.
###
section users (username, password) {
inline section (1) { 'Azoraqua', '872E4E50CE9990D8B041330C47C9DDD11BEC6B503AE9386A99DA8584E9BB12C4' }
}
@Azoraqua
Copy link
Author

Azoraqua commented Aug 27, 2018

With a bit of colors added it'll look nicer :)

Syntax with colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment