Commit Graph

99 Commits

Author SHA1 Message Date
Umur Ozkul
949b57c426 Error reporting if function arguments are defined
map(arr, toSample) now correctly reports

toSample not found

instead of

macro(Array,Symbol) not defined
2022-05-21 19:18:39 +02:00
Umur Ozkul
2265254531 Filter arguments passed to mathjs calls by type so that error messages are not too weird 2022-05-21 18:05:55 +02:00
Umur Ozkul
feb0284a89 format 2022-05-20 18:20:00 +02:00
Umur Ozkul
1557c197a0 renamed internal variables starting with $ so that they are not overriden by $ variables in Squigle 2022-05-20 17:11:32 +02:00
Umur Ozkul
870b0c9d4e hidden macros 2022-05-20 17:05:53 +02:00
Umur Ozkul
b165ccac9f floats in scientific notation and optional leading zero 2022-05-20 15:18:27 +02:00
Umur Ozkul
c1f269e9a4 fixed logical operator priority 2022-05-20 00:29:04 +02:00
Umur Ozkul
6b2e509aea pipes, binary, unary and post operators test 2022-05-19 23:35:15 +02:00
Umur Ozkul
75c913fac3 fixes #522 2022-05-19 20:45:15 +02:00
Umur Ozkul
ffedc5dbb3 multi-line tests 2022-05-19 20:38:10 +02:00
Umur Ozkul
a51e4be528 format 2022-05-19 20:25:18 +02:00
Umur Ozkul
c496ae5cdd multi-line tests 2022-05-19 18:19:09 +02:00
Umur Ozkul
638548c37b multi-line comment 2022-05-19 18:04:51 +02:00
Umur Ozkul
7ccb1d8108 multi-line tests 2022-05-19 17:59:25 +02:00
Umur Ozkul
3371c51e94 post operators test 2022-05-19 17:47:26 +02:00
Umur Ozkul
56f0c9c290 lambda tests 2022-05-19 17:40:30 +02:00
Umur Ozkul
7bfe286f42 multiplicative tests 2022-05-19 17:32:14 +02:00
Umur Ozkul
0753311b93 logical tests 2022-05-19 17:14:16 +02:00
Umur Ozkul
470a6add42 update ternary 2022-05-19 16:45:50 +02:00
Umur Ozkul
4ce1ab1172 added subtract test 2022-05-19 15:21:49 +02:00
Umur Ozkul
7b5fd2b101 Merge branch 'develop' into reducer-dev 2022-05-19 01:28:37 +02:00
Umur Ozkul
db050668d1 parser
toFunction

additive multiplicative

compact

whitespace

pow

relational equality

boolean

whitespace separator

left associative operators

expression

not

identifier

function call

array constructor

string

indexed values

ident

priority

block

outerBlock

optional final expression

statement separator

outerBlock

innerBlock

better errors

note xor

white space and record

unary minus

inner/outer block

statement

lambda

sort

lambda is a value constructor

lambdaCall

ternary

ternary

basicValue

cleanup

quotes

chained Functions

dot operators

unify unary operators

unify unary operatos

notes

notes

notes

notes

parser

priorities set

white space or newline defined

allow newlines

notes

function call has become a post operator

recordElement

recursive index

postOperatorToFunction

better integer

comments

notes

record priority

comment

atom

finalComment

generated parser

type cast

format

initiate test file

test initiated; todo nodeCall; nodeExpression

callIdentifier

recover extra

initiate testing

initial tests pass

tests pass

remove function node

ternary

test parse passed

to

tests pass

notes

sort

toExpression

format

notes

remove unused modules

remove unnecessary nodeLambdaCall

notes

note

fix construct array

comment test

todo

elixir pipe

fix toString

notes

initial to expression test

value test

parsing records

records

comments

ternary

ifthenelse

inner block passed

inner block

lambda

lambda

new parser tested

now test tricks

ternary in expression

to test lambda as argument

to test lambda in structures

Use peggy Parser

expectEvalError

macros tested

remove mathjs parse

reducer test

comparison operator
2022-05-19 01:23:43 +02:00
Ozzie Gooen
606f24ff24 Cleanup and addition of toInternalSampleArray 2022-05-15 21:34:36 -04:00
Umur Ozkul
99f54f596c ternary operator (tested) 2022-05-04 22:36:34 +02:00
Umur Ozkul
888b615445 Merge branch 'reducer-dev-F-ifthenelse' into ternary
packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Builder.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res
2022-05-04 21:51:15 +02:00
Umur Ozkul
8aa4248996 spelling 2022-05-04 21:23:40 +02:00
Umur Ozkul
ad220ed2b4 foreign function interface 2022-05-04 20:44:46 +02:00
Umur Ozkul
5de6aa8e0d map reduce reduceReverse reverse keep 2022-05-04 17:32:25 +02:00
Umur Ozkul
33ee0b27d5 remove inspect performance completely
Redesign required on the function interface
2022-05-04 15:14:34 +02:00
Umur Ozkul
88428c74af cases to handle with new parser. lambdas in arrays and records 2022-05-03 00:44:38 +02:00
Umur Ozkul
c5ae846df4 Note duplicate parameters 2022-05-03 00:30:41 +02:00
Umur Ozkul
78f46daed8 Note infinite recursion 2022-05-03 00:18:23 +02:00
Umur Ozkul
d26eaa2523 Note infinite recursion 2022-05-03 00:16:29 +02:00
Umur Ozkul
11d4a3bc8b do not export private modules from Reducer module 2022-05-02 23:42:11 +02:00
Umur Ozkul
490e4908e1 sam's monkeying 2022-05-02 23:18:36 +02:00
Umur Ozkul
6a3b35eb4a fixed function f not bound 2022-05-02 23:12:57 +02:00
Umur Ozkul
5a0b436932 No 666 2022-05-02 18:00:47 +02:00
Umur Ozkul
f5d3da4c73 tests 2022-05-02 15:55:02 +02:00
Umur Ozkul
9e41f0399f RENotAFunction 2022-05-02 15:55:02 +02:00
Umur Ozkul
ba104e4dfe Catching unreduced values. This is not a lazy language 2022-05-02 15:55:02 +02:00
Umur Ozkul
c68138e5f6 arity error 2022-05-02 14:19:04 +02:00
Umur Ozkul
1e673e54c3 function tricks test defined (Sam's trials) 2022-05-02 12:27:07 +02:00
Umur Ozkul
087596ec43 function trics 2022-05-02 11:44:09 +02:00
Umur Ozkul
e262f76d98 spelling 2022-05-02 11:20:08 +02:00
Umur Ozkul
76b3adddc4 rename to exampleStatementY 2022-05-02 11:12:12 +02:00
Umur Ozkul
351381339c bug fixed
logs removed
2022-04-29 18:19:52 +02:00
Umur Ozkul
8e318a8aa9 refactor reducer
removed some extra array references

rename Builder to ExpressionBuilder

Expression Builder

Trash Warning

remove parsePartial/Outer, add context to lambda

format

module Bindings

simplify types

module Macro

reduceValueList

do macro call

result map

bindings stop replacing on macro calls

Macro Test

doBindStatement

bind a statement

bindings tested. TODO bind shadowing in lambda

block tests defined

block tests defined

blocks tested

macro lambda test defined
2022-04-29 16:40:32 +02:00
Umur Ozkul
7b052ee3c3 format 2022-04-27 22:24:06 +02:00
Umur Ozkul
54f8b10a95 Reducer: Environment (Give environement to all function dispatches) - closes #169 2022-04-27 22:00:42 +02:00
Umur Ozkul
d00834bbe0 fix spelling - PR#366 2022-04-25 17:42:21 +02:00