Skip to content

Instantly share code, notes, and snippets.

@ryanrousseau
Created April 15, 2014 01:50
Show Gist options
  • Save ryanrousseau/10695524 to your computer and use it in GitHub Desktop.
Save ryanrousseau/10695524 to your computer and use it in GitHub Desktop.
using System;
using ScriptCs.Contracts;
namespace ScriptCs.Exec
{
public class PrintLinePreprocessor : DirectiveLineProcessor
{
public PrintLinePreprocessor()
{
Console.WriteLine("PrintLinePreprocessor created");
}
protected override string DirectiveName
{
get { return "print"; }
}
protected override bool ProcessLine(IFileParser parser, FileParserContext context, string line)
{
var arg = GetDirectiveArgument(line);
Console.WriteLine(arg);
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment