Skip to content

v0.16.0

Compare
Choose a tag to compare
@fvictorio fvictorio released this 27 Feb 12:44
· 107 commits to master since this release
3bc5b63

This version adds support for user-defined operators.

The UsingForDeclaration node now has a new operators property. This is an array with the same length as the functions array. Each item is either a string or null: if an operator is defined, then the string is the operator; if an operator is not defined, the item is null.

For example, using { add as +, sub } for Fixed18 global will result in this node:

{
  "type": "UsingForDeclaration",
  "isGlobal": true,
  "typeName": {
    "type": "UserDefinedTypeName",
    "namePath": "Fixed18"
  },
  "libraryName": null,
  "functions": ["add", "sub"],
  "operators": ["+", null]
}