Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language aware exercise template parser #26

Closed
ljleppan opened this issue Sep 3, 2015 · 2 comments
Closed

Language aware exercise template parser #26

ljleppan opened this issue Sep 3, 2015 · 2 comments

Comments

@ljleppan
Copy link
Member

ljleppan commented Sep 3, 2015

This issue depends on #25.

In an ideal case, we would like to allow any style of comments legal in a language's syntax to be used to mark the stub and solution blocks in exercise templates.

For this to be possible, the language plugins must supply the template parser with information on what kind of comment strings to except. So for Java, accept comments of type // .. and /* .. */, and for python accept comments of type # .. and """\n .. \n""".

The parser should be adapted to retrieve information of possible start and end symbols from a language plugin and then parse the exercise template based on those.

@DarthKipsu
Copy link
Contributor

Where in language plugin should this information be provided in? I can work on this, but I'd like to get some more info on what is required on the plugins side.

@ljleppan
Copy link
Member Author

I suspect the most preferable way to implement this is by building all the logic in tmc-langs-framework and then only have the comment tokens / regexes / whatevers in the specific plugins. Actual implementation details are left to the coder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants