Exemplo n.º 1
0
            /// <summary>
            /// Inclusion Visitor
            /// </summary>
            /// <param name="file">Clang File</param>
            /// <param name="location_stack">Clang Source Location Stack</param>
            /// <param name="client_data">Client Data</param>
            private void Visitor(ClangFile file, ClangSourceLocation[] location_stack, IntPtr client_data)
            {
                var depth = location_stack.Length;

                var indent = new string(' ', depth * 2);

                var filename = file.ToFullPath();

                this.SendMessage($"{indent}{filename}");
            }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="index_client_file">Clang Index Client File</param>
 /// <param name="file">Clang File</param>
 /// <param name="line">Line</param>
 /// <param name="column">Column</param>
 /// <param name="offset">Offset</param>
 public ClangIndexFileLocation(ClangIndexClientFile index_client_file, ClangFile file, uint line, uint column, uint offset)
     : base(file, line, column, offset)
 {
     this.IndexClientFile = index_client_file;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Convert to Full Path
        /// </summary>
        /// <param name="file">Clang File</param>
        /// <returns>Full Path</returns>
        public static string ToFullPath(this ClangFile file)
        {
            var file_name = Path.GetFullPath(file.FileName);

            return(file_name.Replace(@"\", @"/"));
        }