예제 #1
0
        public static Procedure Create(ILineInfo line)
        {
            var procedure = new Procedure()
            {
                LineNumber = line.LineNumber,
                Name       = line.GetName(),
                Inline     = line.GetAttribute() == "inline"
            };

            switch (line.Type)
            {
            case Lexer.LineType.Procedure:
                procedure.End = false;
                break;

            case Lexer.LineType.EndP:
                procedure.End = true;
                break;

            default:
                return(null);
            }
            return(procedure);
        }