Open priyasrikumar opened 11 months ago
Great; thanks! One minor question:
- Initializing variables without a type annotation (i.e.,
my_bool: bool = false;
parses, butmy_bool = false;
fails)- Parsing a new Strand: syntax in the example programs is currently
x = Strand();
, but the parser only parsesx: Strand = Strand;
These sound like the same issue to me: i.e., all variable declarations need a type. So the syntax only supports <ident>: <type> = <expr>
but not <ident> = <expr>
. Is that right? (And separately, if so, can we work around this for now by just adding explicit types everywhere?)
The second bullet point was meant to capture that instantiating a Strand
using the Strand()
syntax (with parens) doesn't work. In particular, we can parse x: Strand = Strand
, but not x: Strand = Strand()
. I see how that's a bit unclear with the current wording. I will reword that point so that it's more clearly about that specific issue!
Got it!
This issue serves as a way to keep track of parts of Pollen programs (see #134) that are not currently parsed correctly. To remedy this, either the Pollen language or the Pollen parser should be changed.
graph my_graph
parset ...
for x in y
my_bool: bool = false;
parses, butmy_bool = false;
fails)if
andif ... else ...
push
forStrand
s andlength
forList<...>
s, etc.Strand
withStrand()
, i.e.,x: Strand = Strand();
outset ...
(or whatever word we end up using)This list may not be complete, but it should be enough for us to get the ball rolling and we can update as we go!