Last active
December 4, 2017 19:52
-
-
Save brcontainer/f2b767ed00139fda4b4a7cb937a73a10 to your computer and use it in GitHub Desktop.
Linguagem imaginária mais semelhante ao "Python" (as extensões .any e .am são temporárias/imaginárias)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Example # importa o Example.any | |
class Evolution extends Example: | |
public def __init__(): # Construtor | |
super("teste") # Equivalente ao super do Java, ele "executa" o Example.__init__(args...) passando o argumentos | |
self.show() # Executa como o Example.show | |
public def __destroy__(): # É equivalente ao __destruct() do php ou Foo::~Foo() do C++ | |
print("Bye :(") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foo, Bar.Baz, Boo.* # Importa outras classes | |
class Example: | |
public test | |
public def __init__(argument1): | |
self.test = argument1 | |
protected def getMyInt(): | |
return self.myint | |
private def show(): | |
print(self.test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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