« first day (3 days earlier)      last day (548 days later) » 

11:44 PM
Hai
 
hai
What can I do?
Just tell me briefly please.
 
Also, ಠ_ಠ at the name
^^ mt
 
If not, will leave to play minecraft.
 
@EasterlyIrk parse an expression?
 
kay.
What kind?
 
11:44 PM
see the expression syntax:
 
@CᴏɴᴏʀO'Bʀɪᴇɴ IKR? Asiago FTW!
 
so sometihng like: 2 + (String:"foo") * (sqrt 3)
 
What should that give?
> "foo"*sqrt(3)
um
 
it should tokenize it into the CheddatTokens class
so...
CheddarTokens [
  CheddarNumber {2},
  CheddarOperator{ "+" },
  CheddarExpression { CheddarType{ CheddarString { "foo" } } }
  CheddarOperator{ "*" }
]
 
okai
 
11:47 PM
so what should we do?
 
actually help writing something to parse an operator would be helpful
so given some code and an index, and a list of operators, match the longest operator possible
 
Where do I write this?
 
Like can I write it in a new copy of test.js and then you guys put it in the write spot?
 
@Downgoat Clarify?
 
11:49 PM
e.g. "!==", 0, ['!==', '!'] -> "!=="
 
dangit, gtg for a bit
 
bai for maybe 5 min
 
@EasterlyIrk .o/
 
\o/
*shing* *aaaaaaaah*
.o/
*blood here*
 
11:50 PM
I still don't quite get what you are asking... ^^"
 
Split the code into the operators that make it up.
 
so I need to write a function to get an operator. The function receives the code, a list of operators, and the index at which to start parsing. The function should parse the longest operator possible (which is in the provided list of operators) which starts at the given index.
if there is none, it can just return null for now
 
longest operator as in the length of?
 
yeah
 
So, ["!", "==", "!==", "~crazyLongOp~"] 0` would be ~crazyLongOp~?
 
11:54 PM
if the code was ~crazyLongOp~, then yes.
 
I don't really understand, and that's probably my problem :P not very experienced in the ways of parsing.
 
TheFunction("1 !== 2", 2, ['!', '!==']) -> "!--"
 
So, is the third argument a list of operators?
 
yes
 
11:58 PM
And 2 is the index of the string, not of the number of tokens?
(Also, it's not !--)
 

« first day (3 days earlier)      last day (548 days later) »