Update local bindings (multiple value, typespec, patterns) fixes issues #35 & #246 #322

Merged
merged 35 commits into from Aug 13, 2012

1 participant

@ghost

Local bindings update

  • multiple value bindings
  • typespecs
  • patterns/predicates in local scope
  • var/ref/forward semantics preserved
  • alias binding not modified

Added simple test

Jeremy Clifford added some commits Apr 25, 2012
Jeremy Clifford Add binding pred/patterns and use argument list for optional typed id…
…entifiers.

Update binding cloning
Update binding parsing.
090ee61
Jeremy Clifford Remove predicate from localbinding code. 27dddf5
Jeremy Clifford Local binding typespec/patternvars parsed correctly. 45f2d6c
Jeremy Clifford Add VAR variadic assignment, typespec, patternvars.
Implicit unpack broken!
27f8d00
Jeremy Clifford Change multi into count. 8299981
Jeremy Clifford Debugging ref bindings ca40051
Jeremy Clifford Remove ref debug (not the issue - appears to be exceptions broken) d712078
Jeremy Clifford Remove more debugging stuff from codegen f8cab41
Jeremy Clifford Update evalBinding 14afc23
Jeremy Clifford Merge branch 'mathlib' into bindings c997dda
Jeremy Clifford Merge branch 'master' into bindings e87c5de
Jeremy Clifford Debugging 539b2c0
Jeremy Clifford debugging ea0e2b7
Jeremy Clifford Debugging 04d7da2
Jeremy Clifford debugging stuff 6a62bd3
Jeremy Clifford Merge remote-tracking branch 'upstream/master' into bindings
Conflicts:
	lib-clay/math/libm/libm.windows.clay
1ff5f8e
Jeremy Clifford Bindings updates c27bbb5
Jeremy Clifford Merge branch 'master' into bindings 4de1bc2
Jeremy Clifford replace swtich in codegenbinding c5d6a40
Jeremy Clifford Bindings 70bb75f
Jeremy Clifford Binding typespec checking implemented for 'var' only
Binding patterns/predicates working
31305c3
Jeremy Clifford Typespec & binding patterns - all tests pass 1fc96ab
Jeremy Clifford Rework binding analysis
Add binding match errors
b348c60
Jeremy Clifford Add variadic ref/forward bindings 6fd1727
Jeremy Clifford Remove whitespace 59d3ad3
Jeremy Clifford Merge remote-tracking branch 'upstream/master' into bindings
Conflicts:
	compiler/src/clay.hpp
	compiler/src/error.cpp
9f2353d
Jeremy Clifford Remove some debug msgs 7f4a2bf
Jeremy Clifford Update evaluator bindings e40f03a
Jeremy Clifford Remove blah from test 2b7a03b
Jeremy Clifford Fix binding eval and clone ef8e522
Jeremy Clifford Fix codegen missing inline stuff 42a8b19
Jeremy Clifford Tidy up some whitespace 7059108
Jeremy Clifford Add variadic binding test 1621e73
Jeremy Clifford Update variadic binding test output fed1697
@jckarter jckarter commented on an outdated diff Aug 11, 2012
test/uncategorized/16/main.clay
@@ -7,7 +7,7 @@ enum Kind (
);
main() {
- var a, b, = UGLY, BAD, ;
+ var a, b = UGLY, BAD, ;
@jckarter
Owner

Why was the comma removed? Does the trailing comma not work anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jckarter jckarter commented on an outdated diff Aug 11, 2012
test/bindings/variadic/main.clay
+ var ..a = ..y;
+ nthValue(#0,..a) = 189;
+ return ..a;
+}
+
+main() {
+
+ var [..I] a:Int32, ..c:I = 4, 5, 4, 5, 6, 7;
+ var ..b = ..foo(..c);
+ ref ..j = ..b;
+ println(..j);
+ println(..c);
+
+ var zero, one, ..rest = integers(#10);
+ println(..weaveValues(", ", ..rest));
+}
@jckarter
Owner

Maybe also add a println(..weaveValues(", ", ..I)); to show that I binds to the right values Int, Int, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Jeremy Clifford Update bindings test to show inferred types.
Allow trailing comma when parsing bindings.
Replace comma in uncat/16 test.
72a83a0
@ghost

I've allowed a trailing comma in the binding list. Eventually i'll add some more tests for the bindings.

@jckarter jckarter merged commit d13a1c8 into jckarter:master Aug 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment