Ejemplo n.º 1
0
        public PreprocessorDefine(string name, string content, List <string> paramNames, FilePosition filePos)
        {
            _name       = name;
            _content    = content;
            _paramNames = paramNames;
            _filePos    = filePos;

            if (_paramNames == null)
            {
                var parser   = new CodeParser(_content);
                var dataType = DataType.TryParse(new DataType.ParseArgs
                {
                    Code = parser,
                    //TypeName = _name
                });
                if (dataType != null)
                {
                    // If the data type does not consume the entire string, then this is not a data type definition.
                    if (parser.Read())
                    {
                        dataType = null;
                    }
                    else if (dataType.Name == null)
                    {
                        dataType.Name = _name;
                    }
                }

                _dataType = dataType;
            }
        }
Ejemplo n.º 2
0
 public Reference(Definition def, FilePosition filePos)
 {
     _def     = def;
     _filePos = filePos;
 }