Este sítio funciona melhor com JavaScript.
Página inicial
Explorar
Ajuda
Iniciar sessão
MaximeBarniaudy
/
minproto
derivado de
piumarta/minproto
Vigiar
1
Marcar como favorito
0
Derivar
0
Código
Questões
0
Pedidos de integração
0
Lançamentos
0
Wiki
Trabalho
67
Cometimentos
1
Ramo
4.0 MiB
Árvore:
b23a65dbb0
master
Ramos
Etiquetas
${ item.name }
Criar ramo
${ searchTerm }
de 'b23a65dbb0'
${ noResults }
Gráfico de cometimentos
39 Cometimentos (b23a65dbb0cbb2b4127c25e28121e8d3f0ae8c8c)
Autor
SHA1
Mensagem
Data
MaximeBarniaudy
b23a65dbb0
Add optional base argument to String.asInteger
há 11 meses
MaximeBarniaudy
1ec2c7d8ef
parser circularity
há 1 ano
MaximeBarniaudy
dfa680df47
dotdot got lost in merging
há 1 ano
MaximeBarniaudy
d170f243ee
Add an intern primitive for symbol creation
há 1 ano
WitherFlower
561c1dcb80
Merge range access and grammar parser changes
há 1 ano
Ian Piumarta
1acd725af0
Default grammar is part of PEG VM frame. RULE2 and CALL2 change the default grammar for the duration of the rule being called.
há 10 meses
Ian Piumarta
1bf9944ff1
String literals make fresh copies of themselves every time they are evaluated.
há 10 meses
Ian Piumarta
4065107170
String_append(), _appendAll(), and _format() allocate new memory to allow raw pointers to old content to persist. Add PEG operations TEST (fail if function returns false) and RULE2 (call rule in other grammar). PEG instruction's second operand is object not integer. Initialise top level state.variables with empty object in vmRun(). PEG instruction FAIL removes all actions added by its rule.
há 10 meses
Ian Piumarta
7e46198826
Fix double-eval bug in apply(). Grow buffers by more than 1 wherever performance matters.
há 11 meses
Ian Piumarta
ea38861c4d
vmCompile() checks that all PC destinations are in range. STRING and CLASS opcodes read the argument length from their string, ignoring the explicit length given in the program.
há 11 meses
Ian Piumarta
1ea2557f7e
Fix digitValue() and reading of numerical escaped characters in strings. Indexing a string always returns an unsigned char value. Add PEG VM and corresponding primitive __match__().
há 11 meses
Ian Piumarta
c10c320d4e
Add profiling support when compiled with PROFILE=1 and command-line option -p to enable profiling. Add [from:to] syntax for array and string slices. Fix passing of environment between primitive and user-defined __eval__ methods.
há 11 meses
Ian Piumarta
4b75732a7e
Support super.id() to call method id in the delegate of the object in which the currently running method was found. Add __extern__ to support foreign function calls.
há 11 meses
Ian Piumarta
f2e790cb26
Add String.bitSet, .bitClear, .bitInvert, bitTest, .charClass, .compareFrom.
há 11 meses
Ian Piumarta
e57242eb5d
Prefix 'local' constrins variables to be in current scope. Variable references, inrement operator l-values, and function definitions can all be qualified 'local' or 'global'.
há 11 meses
Ian Piumarta
4622db9d34
Simplify variable lookup and implicit variable declarations.
há 11 meses
Ian Piumarta
2983237af0
Object.push(x) returns self, not x.
há 11 meses
Ian Piumarta
2171f47dce
Fold constants during parsing if FOLDCONST=1.
há 11 meses
Ian Piumarta
4d396d6170
Fix floating point comparison and assignment operators.
há 11 meses
Ian Piumarta
883a9cf7c2
Remove let and ::. Add global keyword. Add Ref/Get/SetSym. Cast the 0 terminator in genericError to oop to ensure va_arg picks it up. Better error messages for broken statements in blocks and broken expressions in argument lists.
há 11 meses
Ian Piumarta
dcbef49750
Exceptions are supported with syntax "try {} catch (e) {}", "try {} ensure {}", and "raise e". Add catch to the list of words that can end an expression statement. Most runtime errors are reported using exceptions when EXCEPTIONS=1. Add String_repeat() supporting multiplying a string and an integer. Illegal escape sequence in a string is a warning not an error. Break and continue work properly in while(). ForFromTo evaluates its start and end arguments. Rename primitive fatal() to error().
há 11 meses
Ian Piumarta
46c7ef6f32
Run the first non-option command line argument as the program. Set _argv__ to program name plus any following command-line arguments.
há 11 meses
Ian Piumarta
2fcfaa962b
Primitives have a unique integer index to identify them. Add String_appendString(base, ext) with the obvious behaviour. Rename newStringEscaped -> newStringUnescaped to describe its operation not its input. Add String_escaped() to replace non-graphic characters. Add String_push() to append characters or strings. Add __primitives__ containing an array of all primitives. Add reverseString() that reverse a string in-place. Add reverseObject() that reverses an object in-place. Add reversed() that returns a reversed copy of an object or string. Fix Let_codeOn() to avoid the # in front of the variable name. Add /* ... */ syntax for multi-line, nesting comments. Add method String.new() to make a new, empty string. Add methods String.escaped(), String.unescaped(). Add method String.push() to append a character or another string. Add method String.pop() to remove and return the last character. Add methods String.asInteger(), String.asFloat(), String.asSymbol(). Provide an implementation of strnstr() for C libraries that lack it. Add method Object.includes() that searches indexable part of an object. Add method String.includes() that searches for characters or strings. Add String.sliced(start, stop) that returns a sub-string. Add method Symbol.asString(). Add method Object.findKey(). Add primitive reversed(). Add methods Symbol.getopt() and Symbol.setopt(). Add method Symbol.defined() that checks the global value, whereas the defined() primitive checks all visible bindings. Add method Symbol.define() to set the global value. Add method Symbol.value() to retrieve the global value. Add method Symbol.allInstances().
há 1 ano
Ian Piumarta
09c41142f3
<type>.eval methods are installed in all built-in object types when TYPECODES=1. println() prints object properties in alphabetical order.
há 1 ano
Ian Piumarta
4ac12f91c5
Add symbols #O, #d, #v and Symbol.setop() primitive. Add primitive method Symbol.setopt(N) to set command-line option at runtime. Add primitive method Symbol.defined() to test if a variable name has been defined. Overload primitive "+" to concatenate strings. Add stack of namespaces, initialised to empty object. refvar() and getvar() search namespaces, from most to least recent, when looking for global variables. setvar() always defines globals in the most recent namespace regardless of any existing shadowed definitions. Make OBJ::NAME a synonym for OBJ.NAME except that OBJ::NAME() applies a function whereas OBJ.NAME() invokes method NAME on OBJ. Add primitive error() to print source location, error message, and backtrace.
há 1 ano
Ian Piumarta
31e6d2ff3d
Primitives have correct names. Primitive Object.keys() returns properties that do not begin with "__". Add method Object.allKeys() that returns properties that do not begin with "__". Add method Object.sorted() to sort indexable elements. Add function sorted() for String and Object. Relations do not consider strings and symbols to be comparable. Printing strings does not include quotation marks at indentation levels 0 and 1. Printing strings escapes control characters at indentation levels other than 0 and 1. Rename SetVar.expr to SetVar.value to be consistent with SetProp and SetArray. Add RefVar, RefProp, RefArray that compute address of assignable value. Add Binops for autoincrement and assignment operators. Any expression can be the subject of increment or assignment operator. Enforce lvalue for increment and assignment operators by semanic check, not in syntax. String literals can contain escaped quotation marks. Keyword:value pairs in parameter lists provide arbitray expressions as default parameter values. Evaluate and assign default parameters values in apply().
há 1 ano
Ian Piumarta
9cc8c3e572
Top-level expressions use the value of symbol __globals__ as the base environment instead of nil. Fix off-by-1 error in nlrPush(). Object.keys() returns keys in alphabetical order.
há 1 ano
Ian Piumarta
057733b85f
Binary operators store pointer to implementation to avoid operator selection during eval.
há 1 ano
Ian Piumarta
2f164a3100
Use spaces instead of tabs to preserve visual alignment in broken tools.
há 1 ano
Ian Piumarta
30facb810c
Add auto increment/decrement and assignment operators.
há 1 ano
Ian Piumarta
4d570df59e
ForToFrom performs update step after continue.
há 1 ano
Ian Piumarta
5ca296eb47
Add return, break, and continue.
há 1 ano
Ian Piumarta
57fe021082
All symbols created with UNDEFINED_TYPECODE by default. AST nodes with undefined typecode are evaluated by invoking the method __eval__ on the node. Typecode is looked up in the immediate delegate of a node only. Object.__eval__() is primitive and returns self.
há 1 ano
Ian Piumarta
4a959a124f
Accessing an undefined variable causes a fatal error.
há 1 ano
Ian Piumarta
ddff3e48e8
Add "let name = value, ... ;" to create local variables.
há 1 ano
Ian Piumarta
3c992f4a13
Remove primitive makeForm (because Closure.fixed is now accessibe from userland).
há 1 ano
Ian Piumarta
72753c6725
All fields of Lambda and Closure are accessible via Object_{get,put}.
há 1 ano
Ian Piumarta
bc3aae1dcb
Block_eval() executes its body in a new environment
há 1 ano
Ian Piumarta
ec29069aa4
import files
há 1 ano