Parsed source code - a text classification problem?

Hi, I’m new to machine learning, so excuse me if this is a foolish question. I’m working on a data science project in R, where I attempt to predict whether a Swift code sample is correct or not. The data comes from IBM’s Project CodeNet, which has 14 million code samples from code problem websites (6000 of which are in Swift). Each code sample is annotated with whether it was accepted or rejected.

I was thinking of parsing all of the code samples into their Abstract Syntax Tree (in this case the Swift Abstract Syntax Tree), which is basically an ultra-labelled version of the source code, and then passing the parsed AST into a neural net, so that it can learn how to predict whether a code sample is right or wrong.

Is this a text classification problem? The Abstract Syntax Tree is all text, and I’m trying to classify it into accepted / rejected, but it’s also extremely structured. So can I consider it like one, or is there some other tool which would be better suited for this situation?

As I’ve been looking around, I’ve come to the realisation that this is a supervised binary graph classification problem – so a graph convolutional network using the stellargraph library should do the trick. Let me know if you think I’m totally wrong about this!