var searchIndex = {}; searchIndex["xswag_base"] = {"doc":"`xswag-base` provides basic functionality for the xswag system.","items":[[0,"code","xswag_base","This module contains types and functions to work on the raw source code.",null,null],[3,"BytePos","xswag_base::code","Position within source specified by byte offset. This is not equal to\n`CharPos` thanks to UTF-8 and multibyte chars. This type always represents\npositions relative to the whole codemap.",null,null],[12,"0","","",0,null],[3,"Span","","A region within the source specified by first and last byte offset. `lo`\nbyte is included in the span, `hi` byte is excluded.",null,null],[12,"lo","","Low byte, inclusive",1,null],[12,"hi","","High byte, exclusive",1,null],[3,"LineIdx","","Represents a line index.",null,null],[12,"0","","",2,null],[3,"ColIdx","","Represents a column index.",null,null],[12,"0","","",3,null],[3,"Loc","","Location within one file specified by line and column.",null,null],[12,"line","","",4,null],[12,"col","","",4,null],[3,"FileMap","","Stores the content of a file and keeps track of some position meta data,\nsuch as linebreaks.",null,null],[11,"default","","",0,{"inputs":[],"output":{"name":"bytepos"}}],[11,"fmt","","",0,null],[11,"cmp","","",0,null],[11,"partial_cmp","","",0,null],[11,"lt","","",0,null],[11,"le","","",0,null],[11,"gt","","",0,null],[11,"ge","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"add","","",0,null],[11,"sub","","",0,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"single","","Creates a span that points to a single char",1,{"inputs":[{"name":"bytepos"}],"output":{"name":"span"}}],[11,"empty_at","","Crates an empty span (points between to chars)",1,{"inputs":[{"name":"bytepos"}],"output":{"name":"span"}}],[11,"new","","Creates a span from a lo and hi (shorter than struct constructor\nsyntax)",1,{"inputs":[{"name":"bytepos"},{"name":"bytepos"}],"output":{"name":"span"}}],[11,"from_pair","","Creates a span from a tuple",1,null],[11,"dummy","","Creates a dummy span. Should be used with caution.",1,{"inputs":[],"output":{"name":"span"}}],[11,"is_dummy","","Checks if the this span is a dummy span",1,null],[11,"is_empty","","Checks if the span is empty",1,null],[11,"len","","Returns the length (number of bytes) of the span or 0 if it's a dummy\nspan",1,null],[11,"hull","","Returns the smallest span which encloses both given spans",1,null],[11,"contains","","Checks if this span contains another span. A dummy span never contains\nany other span and is never contained in another span.",1,null],[11,"into_range","","Returns a range for indexing strings and vectors",1,null],[11,"fmt","","",1,null],[11,"default","","",2,{"inputs":[],"output":{"name":"lineidx"}}],[11,"fmt","","",2,null],[11,"cmp","","",2,null],[11,"partial_cmp","","",2,null],[11,"lt","","",2,null],[11,"le","","",2,null],[11,"gt","","",2,null],[11,"ge","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"default","","",3,{"inputs":[],"output":{"name":"colidx"}}],[11,"fmt","","",3,null],[11,"cmp","","",3,null],[11,"partial_cmp","","",3,null],[11,"lt","","",3,null],[11,"le","","",3,null],[11,"gt","","",3,null],[11,"ge","","",3,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"clone","","",3,null],[11,"add","","",2,null],[11,"sub","","",2,null],[11,"add","","",3,null],[11,"sub","","",3,null],[11,"fmt","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"new","","Creates a new Filemap from existing buffers for the filename and\ncontent of the file.",5,{"inputs":[{"name":"u"},{"name":"v"}],"output":{"name":"filemap"}}],[11,"filename","","",5,null],[11,"src","","",5,null],[11,"add_line","","Adds a new line beginning with the given BytePos to the list. Line\nbeginnings need to be added in order!",5,null],[11,"num_lines","","Returns the number of lines.",5,null],[11,"get_line_idx","","Returns the (0-based) index of the line in which the byte with the\ngiven `offset` lives.",5,null],[11,"get_loc","","Returns the location of the given bytes as line and col numbers within\nthis file.",5,null],[11,"get_line","","Returns the line with the given index or `None` if it is invalid.",5,null],[11,"get_line_start","","Returns the byte offset of the first symbol in `line`",5,null],[11,"find_lines","","Searches for line endings and collects all line beginnings in the\nsource string. It starts searching at the latest line beginning in the\nlist so far (or at the beginning of none was added yet).",5,null],[11,"fmt","","",5,null],[6,"SrcOffset","","Type do index one byte in a source code. It should be rather small, since\nit's used a lot.",null,null],[0,"diag","xswag_base","Types and functions for error diagnostic and printing",null,null],[3,"Report","xswag_base::diag","Describes some kind of problem or occurrence in the code. Contains one or\nmore remarks with descriptions and separate code spans.",null,null],[12,"kind","","Kind of the report (usually the same as the first remark kind)",6,null],[12,"span","","Span of the main code snippet",6,null],[12,"remarks","","List of remarks describing the report",6,null],[3,"Remark","","Part of a Report that describes the occurrence with an optional code\nsnippet.",null,null],[12,"kind","","",7,null],[12,"desc","","Remark description",7,null],[12,"snippet","","",7,null],[3,"PrintOptions","","Options for printing on the terminal. By `default()` everything is enabled.",null,null],[12,"unicode","","Use of unicode allowed?",8,null],[12,"color","","Use of colors allowed?",8,null],[12,"line_wrap","","Is line wrapping allowed?",8,null],[4,"ReportKind","","A report can either be an `Error` or a `Warning`. Still pretty similar to\n`RemarkType` -- may be merged with it in the future.",null,null],[13,"Error","","Something went very wrong and will stop further processing",9,null],[13,"Warning","","Something important should be fixed, but doesn't stop processing",9,null],[4,"RemarkKind","","Kinds of remarks",null,null],[13,"Error","","Something went very wrong and will stop further processing",10,null],[13,"Warning","","Something important should be fixed, but doesn't stop processing",10,null],[13,"Note","","Additional information about an error or a warning",10,null],[4,"Snippet","","",null,null],[13,"None","","No snippet",11,null],[13,"Orig","","Show the original code with this highlighted span",11,null],[13,"Replace","","Show original code, but replace a part of it with something new and\nhighlight the new part. Hint: also able to only insert.",11,null],[12,"span","xswag_base::diag::Snippet","",11,null],[12,"with","","",11,null],[5,"print","xswag_base::diag","Pretty prints a report",null,{"inputs":[{"name":"report"},{"name":"filemap"},{"name":"printoptions"}],"output":null}],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"clone","","",6,null],[11,"simple_error","","Creates a error report with one message and one span",6,{"inputs":[{"name":"s"},{"name":"span"}],"output":{"name":"report"}}],[11,"simple_spanless_error","","Creates a error report with one message, but without span",6,{"inputs":[{"name":"s"}],"output":{"name":"report"}}],[11,"simple_warning","","Creates a warning report with one message and one span",6,{"inputs":[{"name":"s"},{"name":"span"}],"output":{"name":"report"}}],[11,"with_note","","Adds a note without a span/code snippet to the existing Report",6,null],[11,"with_span_note","","Adds a note with a span/code snippet to the existing Report",6,null],[11,"with_remark","","Adds a remark to the returned Report",6,null],[11,"fmt","","",9,null],[11,"eq","","",9,null],[11,"clone","","",9,null],[11,"fmt","","",7,null],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"clone","","",7,null],[11,"new","","Creates a new remark with the given parameters",7,{"inputs":[{"name":"remarkkind"},{"name":"s"},{"name":"snippet"}],"output":{"name":"self"}}],[11,"error","","Creates a new remark of kind `Error` with the given parameters",7,{"inputs":[{"name":"s"},{"name":"snippet"}],"output":{"name":"self"}}],[11,"warning","","Creates a new remark of kind `Warning` with the given parameters",7,{"inputs":[{"name":"s"},{"name":"snippet"}],"output":{"name":"self"}}],[11,"note","","Creates a new remark of kind `Note` with the given parameters",7,{"inputs":[{"name":"s"},{"name":"snippet"}],"output":{"name":"self"}}],[11,"fmt","","",10,null],[11,"eq","","",10,null],[11,"clone","","",10,null],[11,"eq","","",11,null],[11,"ne","","",11,null],[11,"clone","","",11,null],[11,"fmt","","",11,null],[11,"span","","Returns the span if it exists",11,null],[11,"fmt","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"clone","","",8,null],[11,"default","","",8,{"inputs":[],"output":{"name":"self"}}]],"paths":[[3,"BytePos"],[3,"Span"],[3,"LineIdx"],[3,"ColIdx"],[3,"Loc"],[3,"FileMap"],[3,"Report"],[3,"Remark"],[3,"PrintOptions"],[4,"ReportKind"],[4,"RemarkKind"],[4,"Snippet"]]}; initSearch(searchIndex);