You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.8 KiB

  1. # `amperzand` the Language Outline
  2. So imagine a `.html` page. If the parse starts in the abstract syntax tree of `amperzand` and `<` opening a tag is treated as a statement until `<z />` closes the statement back into the language syntax tree as a printed literal, it becomes an easy extension of a C style syntax with duck typing (but not coercion to stings as I hate that "feature").
  3. * A - `&amp;` - a literal of use.
  4. * B - `break;`
  5. * C - `continue;`
  6. * D - `do {} while();`
  7. * E - `export <name>` - a prefix which exports a name, perhaps even as assigned.
  8. * F - `for(;;) {}`
  9. * G - `gallowed <sub-name>;` - a prefix which allows a hash loaded usage of a new included sub-file.
  10. * H - `hallowed <super-name>;` - a prefix which allows a file to be used by inclusion in a super file.
  11. * I - `if() {} else {}`
  12. * J - `true`
  13. * K - `false`
  14. * L - `&lt;` - another useful literal.
  15. * M - `main(<number>) {}` - a numbered from zero parameter argument with anonymous inner class extension.
  16. * N - `new <file-name>(<args>) {}` - instancing a new file as an object with anonymous outer class extension.
  17. * O - `obj(<string>)` - parses a new object from string.
  18. * P - `&apos;` - occasionally useful.
  19. * Q - `&quot;` - more useful.
  20. * R - `return <x>;`
  21. * S - `switch() { case : break; default: break; }`
  22. * T - `this` - object orientation.
  23. * U - `utf8(<obj>)` - make an explicit string cast.
  24. * V - `void(<obj>)` - a void object with a sub-object explanation monad.
  25. * W - `while() {}`
  26. * X - `xref(<string>)` - a string to variable reference lookup. Maybe used on the LHS of assignment.
  27. * Y - `yield <x>;` - a return variant for continuations.
  28. * Z - `<z />` - a syntax end delimiter of the HTML statement.
  29. And that's about it. Default values from code would have to be entered through the DOM. I think it's technically sufficient.