NArrange.VisualBasic.VBParser.ParseOption C# (CSharp) Method

ParseOption() private method

Parses a VB Option directive from comments.
private ParseOption ( ReadOnlyCollection comments ) : ICodeElement
comments ReadOnlyCollection Comments to analyze.
return ICodeElement
        private ICodeElement ParseOption(ReadOnlyCollection<ICommentElement> comments)
        {
            // HACK: Create an explicit element type for Option (or compiler directive)
            string option = VBKeyword.Option + ReadCodeLine();
            AttributeElement optionElement = new AttributeElement();
            optionElement.BodyText = option;
            optionElement[VBExtendedProperties.Option] = true;

            foreach (ICommentElement comment in comments)
            {
                optionElement.AddHeaderComment(comment);
            }

            return optionElement;
        }