Skip to content

Onoffswitch.net

  • About
  • License

Tag: ast

Extracting scala method names from objects with macros

August 3, 2016

I have a soft spot in me for AST’s ever since I went through the exercise of building my own language. Working in Java I missed the dynamic ability to get compile time information, though I knew it was available as part of the annotation processing pipleine during compilation (which is how lombok works).… Read the rest

Posted in CodeTagged ast, macro, scala

Avoiding nulls with expression trees

April 4, 2014

I’ve blogged about this subject before, but I REALLY hate null refs. This is one of the reasons I love F# and other functional languages, null ref’s almost never happen. But, in the real world I work as a C# dev and have to live with C#’s… nuisances.… Read the rest

Posted in CodeTagged ast, c#, expression tree, null

Implementing the game “Arithmetic”

August 24, 2013

There is a subreddit on reddit called /r/dailyprogrammer and while they don’t actually post exercises daily, they do sometimes post neat questions that are fun to solve. About a week ago, they posted a problem that I solved with F# that I wanted to share.… Read the rest

Posted in CodeTagged arithmetic, ast, expression tree, F#, reddit

Parse whatever with your own parser combinator

August 19, 2013

In a few recent posts I talked about playing with fparsec to parse data into usable syntax trees. But, even after all the time spent fiddling with it, I really didn’t fully understand how combinators actually worked. With that in mind, I decided to build a version of fparsec from scratch.… Read the rest

Posted in CodeTagged ast, combinators, F#, fparsec, parsing
© 2019 Onoffswitch.net • Slightly Theme by Nick Ciliak.