Rethought how object and array literals will work
This commit is contained in:
		
							parent
							
								
									16bca57e36
								
							
						
					
					
						commit
						c172c111d8
					
				@ -63,15 +63,15 @@ data wr integerArrayInitialized:{Int 16}
 | 
			
		||||
data wr integerPointerInit:{Int} [& integer]
 | 
			
		||||
data wr mutIntegerPointerInit:{Int}:mut [& integer]
 | 
			
		||||
data wr object:Obj
 | 
			
		||||
	, this 324
 | 
			
		||||
	, that 2139
 | 
			
		||||
	.this 324
 | 
			
		||||
	.that 2139
 | 
			
		||||
data wr nestedObject:Obj
 | 
			
		||||
	, this
 | 
			
		||||
		, bird0 324
 | 
			
		||||
		, bird1 "hello world"
 | 
			
		||||
	, that
 | 
			
		||||
		, bird2 123.8439
 | 
			
		||||
		, bird3 9328.21348239
 | 
			
		||||
	.this
 | 
			
		||||
		.bird0 324
 | 
			
		||||
		.bird1 "hello world"
 | 
			
		||||
	.that
 | 
			
		||||
		.bird2 123.8439
 | 
			
		||||
		.bird3 9328.21348239
 | 
			
		||||
`, test)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -26,18 +26,26 @@ data wr object:Obj
 | 
			
		||||
	, that 2139
 | 
			
		||||
 | 
			
		||||
data wr nestedObject:Obj
 | 
			
		||||
	, this
 | 
			
		||||
		, bird0 324
 | 
			
		||||
		, bird1 "hello world"
 | 
			
		||||
	, that
 | 
			
		||||
		, bird2 123.8439
 | 
			
		||||
		, bird3 9328.21348239
 | 
			
		||||
	.this
 | 
			
		||||
		.bird0 324
 | 
			
		||||
		.bird1 "hello world"
 | 
			
		||||
	.that
 | 
			
		||||
		.bird2 123.8439
 | 
			
		||||
		.bird3 9328.21348239
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# func rr main
 | 
			
		||||
	# ---
 | 
			
		||||
	# [let object:Obj
 | 
			
		||||
		# , this 324
 | 
			
		||||
		# , that 2139]
 | 
			
		||||
	# # TODO: set should be a special case, checking under itself for object
 | 
			
		||||
	# member initialization args. it should also check for args in general
 | 
			
		||||
	# under there which should be treated as array initialization args.
 | 
			
		||||
	# basically, under a set phrase, it should do the same checks that it
 | 
			
		||||
	# does under a data section.
 | 
			
		||||
	#
 | 
			
		||||
	# let object:Obj , this 324 , that 2139
 | 
			
		||||
	# [set object:Obj]
 | 
			
		||||
		# .this 324
 | 
			
		||||
		# .that 2139
 | 
			
		||||
	# 
 | 
			
		||||
	# set object:Obj 
 | 
			
		||||
	#	.this 324
 | 
			
		||||
	#	.that 2139
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user