Skip to content

Instantly share code, notes, and snippets.

@brcontainer
Last active December 4, 2017 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brcontainer/91472c99a89e3117865bda57b236f539 to your computer and use it in GitHub Desktop.
Save brcontainer/91472c99a89e3117865bda57b236f539 to your computer and use it in GitHub Desktop.
Linguagem imaginária (as extensões .any e .am são temporárias/imaginárias)
import Example # importa o Example.any
class Evolution extends Example:
public void __init__(): # Construtor
super(100, "teste", false) # Equivalente ao super do Java, ele "executa" o Example.__init__(args...) passando o argumentos
self.show() # Executa como o Example.show
public void __destroy__(): # É equivalente ao __destruct() do php ou Foo::~Foo() do C++
print("Bye :(")
import Foo, Bar.Baz, Boo.* # Importa outras classes
class Example:
public int myint
private bool mybool
protected string mystr
public void __init__(int myint, string myint, bool mybool):
self.myint = myint
self.mybool = mybool
self.mystr = mystr
protected int getMyInt():
return self.myint
private void show():
print(self.myint, self.string, self.mybool)
# configurações de "boot", semelhante ao global.asax ou talvez ao php.ini
encoding: utf-8 # Define a codificação padrão
vendor: ./ # o import carrega a partir da mesma pasta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment