Apitax / Scriptax

Scriptax is a general purpose, automation first language used to quickly script together automation.
GNU General Public License v3.0
2 stars 0 forks source link

Due to the addition of constructors, refactor .ah file format #29

Closed ShawnClake closed 5 years ago

ShawnClake commented 5 years ago

The idea is that no procedural code should be exposed in these files anymore. Similar to how a Java file looks like, but without the class declaration itself.

Remove sig from grammar as this function will now be handled via the constructor method.

  1. Imports
  2. Options and other misc things
  3. Extends
  4. Instance Variable Declarations and Initialization
  5. Method Declarations

Example:

from blah import MyBlah;
options();
extends MyBlah;
var1 = "some val";
var2 = "some other val";
script constructor(var1)
{
  me.var1 = var1;
}
script someOtherMethod()
{

}
ShawnClake commented 5 years ago

A fully featured file will now have the following format

from blah import MyBlah;
from foo import Bar;
from bar import Foo;

ahoptions({'name': 'somename'});
extends(MyBlah);
implements(Foo, Bar);

var1 = "some val";
var2 = "some other val";

script construct(var1)
{
  me.var1 = var1;
}
static someOtherMethod()
{

}
ShawnClake commented 5 years ago

grammar added, not implemented

ShawnClake commented 5 years ago

this was swapped to allow for methods being defined prior to the code statements being run