KiCad PCB EDA Suite
panel_setup_rules.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <bitmaps.h>
25#include <confirm.h>
27#include <pcb_edit_frame.h>
28#include <pcb_expr_evaluator.h>
29#include <board.h>
31#include <project.h>
32#include <string_utils.h>
33#include <tool/tool_manager.h>
34#include <panel_setup_rules.h>
36#include <wx/treebook.h>
38#include <scintilla_tricks.h>
39#include <drc/drc_rule_parser.h>
40#include <tools/drc_tool.h>
41#include <pgm_base.h>
42
44 PANEL_SETUP_RULES_BASE( aParent->GetTreebook() ),
45 m_Parent( aParent ),
46 m_frame( aFrame ),
47 m_scintillaTricks( nullptr ),
48 m_helpWindow( nullptr )
49{
50 m_scintillaTricks = new SCINTILLA_TRICKS( m_textEditor, wxT( "()" ), false,
51 [this]()
52 {
53 wxPostEvent( m_Parent, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
54 } );
55
56 m_textEditor->AutoCompSetSeparator( '|' );
57
58 m_netClassRegex.Compile( "^NetClass\\s*[!=]=\\s*$", wxRE_ADVANCED );
59 m_netNameRegex.Compile( "^NetName\\s*[!=]=\\s*$", wxRE_ADVANCED );
60 m_typeRegex.Compile( "^Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
61 m_padTypeRegex.Compile( "^Pad_Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
62 m_pinTypeRegex.Compile( "^Pin_Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
63 m_fabPropRegex.Compile( "^Fabrication_Property\\s*[!=]=\\s*$", wxRE_ADVANCED );
64
65 m_compileButton->SetBitmap( KiBitmap( BITMAPS::drc ) );
66
67 m_textEditor->SetZoom( Pgm().GetCommonSettings()->m_Appearance.text_editor_zoom );
68
69 m_textEditor->UsePopUp( 0 );
70 m_textEditor->Bind( wxEVT_STC_CHARADDED, &PANEL_SETUP_RULES::onScintillaCharAdded, this );
71 m_textEditor->Bind( wxEVT_STC_AUTOCOMP_CHAR_DELETED, &PANEL_SETUP_RULES::onScintillaCharAdded, this );
72 m_textEditor->Bind( wxEVT_CHAR_HOOK, &PANEL_SETUP_RULES::onCharHook, this );
73}
74
75
77{
78 Pgm().GetCommonSettings()->m_Appearance.text_editor_zoom = m_textEditor->GetZoom();
79
80 delete m_scintillaTricks;
81
82 if( m_helpWindow )
83 m_helpWindow->Destroy();
84};
85
86
87void PANEL_SETUP_RULES::onCharHook( wxKeyEvent& aEvent )
88{
89 if( aEvent.GetKeyCode() == WXK_ESCAPE && !m_textEditor->AutoCompActive() )
90 {
91 if( m_originalText != m_textEditor->GetText() )
92 {
93 if( !IsOK( this, _( "Cancel Changes?" ) ) )
94 return;
95 }
96 }
97
98 aEvent.Skip();
99}
100
101
102void PANEL_SETUP_RULES::OnContextMenu(wxMouseEvent &event)
103{
104 wxMenu menu;
105
106 menu.Append( wxID_UNDO, _( "Undo" ) );
107 menu.Append( wxID_REDO, _( "Redo" ) );
108
109 menu.AppendSeparator();
110
111 menu.Append( 1, _( "Cut" ) ); // Don't use wxID_CUT, wxID_COPY, etc. On Mac (at least),
112 menu.Append( 2, _( "Copy" ) ); // wxWidgets never delivers them to us.
113 menu.Append( 3, _( "Paste" ) );
114 menu.Append( 4, _( "Delete" ) );
115
116 menu.AppendSeparator();
117
118 menu.Append( 5, _( "Select All" ) );
119
120 menu.AppendSeparator();
121
122 menu.Append( wxID_ZOOM_IN, _( "Zoom In" ) );
123 menu.Append( wxID_ZOOM_OUT, _( "Zoom Out" ) );
124
125
126 switch( GetPopupMenuSelectionFromUser( menu ) )
127 {
128 case wxID_UNDO:
129 m_textEditor->Undo();
130 break;
131 case wxID_REDO:
132 m_textEditor->Redo();
133 break;
134
135 case 1:
136 m_textEditor->Cut();
137 break;
138 case 2:
139 m_textEditor->Copy();
140 break;
141 case 3:
142 m_textEditor->Paste();
143 break;
144 case 4:
145 {
146 long from, to;
147 m_textEditor->GetSelection( &from, &to );
148
149 if( to > from )
150 m_textEditor->DeleteRange( from, to );
151
152 break;
153 }
154
155 case 5:
156 m_textEditor->SelectAll();
157 break;
158
159 case wxID_ZOOM_IN:
160 m_textEditor->ZoomIn();
161 break;
162 case wxID_ZOOM_OUT:
163 m_textEditor->ZoomOut();
164 break;
165 }
166}
167
168
169void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
170{
172 m_textEditor->SearchAnchor();
173
174 wxString rules = m_textEditor->GetText();
175 int currentPos = m_textEditor->GetCurrentPos();
176 int startPos = 0;
177
178 for( int line = m_textEditor->LineFromPosition( currentPos ); line > 0; line-- )
179 {
180 int lineStart = m_textEditor->PositionFromLine( line );
181 wxString beginning = m_textEditor->GetTextRange( lineStart, lineStart + 10 );
182
183 if( beginning.StartsWith( wxT( "(rule " ) ) )
184 {
185 startPos = lineStart;
186 break;
187 }
188 }
189
190 enum
191 {
192 NONE,
193 STRING,
194 SEXPR_OPEN,
195 SEXPR_TOKEN,
196 SEXPR_STRING,
197 STRUCT_REF
198 };
199
200 auto isDisallowToken =
201 []( const wxString& token ) -> bool
202 {
203 return token == wxT( "buried_via" )
204 || token == wxT( "graphic" )
205 || token == wxT( "hole" )
206 || token == wxT( "micro_via" )
207 || token == wxT( "pad" )
208 || token == wxT( "text" )
209 || token == wxT( "track" )
210 || token == wxT( "via" )
211 || token == wxT( "zone" );
212 };
213
214 std::stack<wxString> sexprs;
215 wxString partial;
216 wxString last;
217 int context = NONE;
218 int expr_context = NONE;
219
220 for( int i = startPos; i < currentPos; ++i )
221 {
222 wxChar c = m_textEditor->GetCharAt( i );
223
224 if( c == '\\' )
225 {
226 i++; // skip escaped char
227 }
228 else if( context == STRING )
229 {
230 if( c == '"' )
231 {
232 context = NONE;
233 }
234 else
235 {
236 if( expr_context == STRING )
237 {
238 if( c == '\'' )
239 expr_context = NONE;
240 else
241 partial += c;
242 }
243 else if( c == '\'' )
244 {
245 last = partial;
246 partial = wxEmptyString;
247 expr_context = STRING;
248 }
249 else if( c == '.' )
250 {
251 partial = wxEmptyString;
252 expr_context = STRUCT_REF;
253 }
254 else
255 {
256 partial += c;
257 }
258 }
259 }
260 else if( c == '"' )
261 {
262 last = partial;
263 partial = wxEmptyString;
264 context = STRING;
265 }
266 else if( c == '(' )
267 {
268 if( context == SEXPR_OPEN && !partial.IsEmpty() )
269 {
270 m_textEditor->AutoCompCancel();
271 sexprs.push( partial );
272 }
273
274 partial = wxEmptyString;
275 context = SEXPR_OPEN;
276 }
277 else if( c == ')' )
278 {
279 while( !sexprs.empty() && ( sexprs.top() == wxT( "assertion" )
280 || sexprs.top() == wxT( "disallow" )
281 || isDisallowToken( sexprs.top() )
282 || sexprs.top() == wxT( "min_resolved_spokes" )
283 || sexprs.top() == wxT( "zone_connection" ) ) )
284 {
285 sexprs.pop();
286 }
287
288 if( !sexprs.empty() )
289 sexprs.pop();
290
291 context = NONE;
292 }
293 else if( c == ' ' )
294 {
295 if( context == SEXPR_OPEN && ( partial == wxT( "constraint" )
296 || partial == wxT( "disallow" )
297 || partial == wxT( "layer" )
298 || partial == wxT( "severity" ) ) )
299 {
300 m_textEditor->AutoCompCancel();
301 sexprs.push( partial );
302
303 partial = wxEmptyString;
304 context = SEXPR_TOKEN;
305 continue;
306 }
307 else if( partial == wxT( "disallow" )
308 || isDisallowToken( partial )
309 || partial == wxT( "min_resolved_spokes" )
310 || partial == wxT( "zone_connection" ) )
311 {
312 m_textEditor->AutoCompCancel();
313 sexprs.push( partial );
314
315 partial = wxEmptyString;
316 context = SEXPR_TOKEN;
317 continue;
318 }
319 else if( partial == wxT( "rule" )
320 || partial == wxT( "assertion" )
321 || partial == wxT( "condition" ) )
322 {
323 m_textEditor->AutoCompCancel();
324 sexprs.push( partial );
325
326 partial = wxEmptyString;
327 context = SEXPR_STRING;
328 continue;
329 }
330
331 context = NONE;
332 }
333 else
334 {
335 partial += c;
336 }
337 }
338
339 wxString tokens;
340
341 if( context == SEXPR_OPEN )
342 {
343 if( sexprs.empty() )
344 {
345 tokens = wxT( "rule|"
346 "version" );
347 }
348 else if( sexprs.top() == wxT( "rule" ) )
349 {
350 tokens = wxT( "condition|"
351 "constraint|"
352 "layer|"
353 "severity" );
354 }
355 else if( sexprs.top() == wxT( "constraint" ) )
356 {
357 tokens = wxT( "max|min|opt" );
358 }
359 }
360 else if( context == SEXPR_TOKEN )
361 {
362 if( sexprs.empty() )
363 {
364 /* badly formed grammar */
365 }
366 else if( sexprs.top() == wxT( "constraint" ) )
367 {
368 tokens = wxT( "annular_width|"
369 "assertion|"
370 "clearance|"
371 "connection_width|"
372 "courtyard_clearance|"
373 "diff_pair_gap|"
374 "diff_pair_uncoupled|"
375 "disallow|"
376 "edge_clearance|"
377 "length|"
378 "hole_clearance|"
379 "hole_size|"
380 "hole_to_hole|"
381 "min_resolved_spokes|"
382 "physical_clearance|"
383 "physical_hole_clearance|"
384 "silk_clearance|"
385 "skew|"
386 "text_height|"
387 "text_thickness|"
388 "thermal_relief_gap|"
389 "thermal_spoke_width|"
390 "track_width|"
391 "via_count|"
392 "via_diameter|"
393 "zone_connection" );
394 }
395 else if( sexprs.top() == wxT( "disallow" ) || isDisallowToken( sexprs.top() ) )
396 {
397 tokens = wxT( "buried_via|"
398 "graphic|"
399 "hole|"
400 "micro_via|"
401 "pad|"
402 "text|"
403 "track|"
404 "via|"
405 "zone" );
406 }
407 else if( sexprs.top() == wxT( "zone_connection" ) )
408 {
409 tokens = wxT( "none|solid|thermal_reliefs" );
410 }
411 else if( sexprs.top() == wxT( "min_resolved_spokes" ) )
412 {
413 tokens = wxT( "0|1|2|3|4" );
414 }
415 else if( sexprs.top() == wxT( "layer" ) )
416 {
417 tokens = wxT( "inner|outer|\"x\"" );
418 }
419 else if( sexprs.top() == wxT( "severity" ) )
420 {
421 tokens = wxT( "warning|error|ignore|exclusion" );
422 }
423 }
424 else if( context == SEXPR_STRING && !sexprs.empty()
425 && ( sexprs.top() == wxT( "condition" ) || sexprs.top() == wxT( "assertion" ) ) )
426 {
427 m_textEditor->AddText( wxT( "\"" ) );
428 }
429 else if( context == STRING && !sexprs.empty()
430 && ( sexprs.top() == wxT( "condition" ) || sexprs.top() == wxT( "assertion" ) ) )
431 {
432 if( expr_context == STRUCT_REF )
433 {
435 std::set<wxString> propNames;
436
437 for( const PROPERTY_MANAGER::CLASS_INFO& cls : propMgr.GetAllClasses() )
438 {
439 const PROPERTY_LIST& props = propMgr.GetProperties( cls.type );
440
441 for( PROPERTY_BASE* prop : props )
442 {
443 wxString ref( prop->Name() );
444 ref.Replace( wxT( " " ), wxT( "_" ) );
445 propNames.insert( ref );
446 }
447 }
448
449 for( const wxString& propName : propNames )
450 tokens += wxT( "|" ) + propName;
451
453
454 for( const wxString& funcSig : functions.GetSignatures() )
455 {
456 if( !funcSig.Contains( "DEPRECATED" ) )
457 tokens += wxT( "|" ) + funcSig;
458 }
459 }
460 else if( expr_context == STRING )
461 {
462 if( m_netClassRegex.Matches( last ) )
463 {
465 std::shared_ptr<NET_SETTINGS>& netSettings = bds.m_NetSettings;
466
467 for( const auto& [ name, netclass ] : netSettings->m_NetClasses )
468 tokens += wxT( "|" ) + name;
469 }
470 else if( m_netNameRegex.Matches( last ) )
471 {
472 BOARD* board = m_frame->GetBoard();
473
474 for( const wxString& netnameCandidate : board->GetNetClassAssignmentCandidates() )
475 tokens += wxT( "|" ) + netnameCandidate;
476 }
477 else if( m_typeRegex.Matches( last ) )
478 {
479 tokens = wxT( "Dimension|"
480 "Footprint|"
481 "Graphic|"
482 "Group|"
483 "Leader|"
484 "Pad|"
485 "Target|"
486 "Text|"
487 "Track|"
488 "Via|"
489 "Zone" );
490 }
491 else if( m_padTypeRegex.Matches( last ) )
492 {
493 tokens = wxT( "Through-hole|"
494 "SMD|"
495 "Edge connector|"
496 "NPTH, mechanical" );
497 }
498 else if( m_pinTypeRegex.Matches( last ) )
499 {
500 tokens = wxT( "Input|"
501 "Output|"
502 "Bidirectional|"
503 "Tri-state|"
504 "Passive|"
505 "Free|"
506 "Unspecified|"
507 "Power input|"
508 "Power output|"
509 "Open collector|"
510 "Open emitter|"
511 "Unconnected" );
512 }
513 else if( m_fabPropRegex.Matches( last ) )
514 {
515 tokens = wxT( "None|"
516 "BGA pad|"
517 "Fiducial, global to board|"
518 "Fiducial, local to footprint|"
519 "Test point pad|"
520 "Heatsink pad|"
521 "Castellated pad" );
522 }
523 }
524 }
525
526 if( !tokens.IsEmpty() )
527 m_scintillaTricks->DoAutocomplete( partial, wxSplit( tokens, '|' ) );
528}
529
530
531void PANEL_SETUP_RULES::OnCompile( wxCommandEvent& event )
532{
534
535 try
536 {
537 std::vector<std::shared_ptr<DRC_RULE>> dummyRules;
538
539 DRC_RULES_PARSER parser( m_textEditor->GetText(), _( "DRC rules" ) );
540
541 parser.Parse( dummyRules, m_errorsReport );
542 }
543 catch( PARSE_ERROR& pe )
544 {
545 wxString msg = wxString::Format( wxT( "%s <a href='%d:%d'>%s</a>%s" ),
546 _( "ERROR:" ),
547 pe.lineNumber,
548 pe.byteIndex,
549 pe.ParseProblem(),
550 wxEmptyString );
551
553 }
554
556}
557
558
559void PANEL_SETUP_RULES::OnErrorLinkClicked( wxHtmlLinkEvent& event )
560{
561 wxString link = event.GetLinkInfo().GetHref();
562 wxArrayString parts;
563 long line = 0, offset = 0;
564
565 wxStringSplit( link, parts, ':' );
566
567 if( parts.size() > 1 )
568 {
569 parts[0].ToLong( &line );
570 parts[1].ToLong( &offset );
571 }
572
573 int pos = m_textEditor->PositionFromLine( line - 1 ) + ( offset - 1 );
574
575 m_textEditor->GotoPos( pos );
576
577 m_textEditor->SetFocus();
578}
579
580
582{
583 wxFileName rulesFile( m_frame->GetDesignRulesPath() );
584
585 if( rulesFile.FileExists() )
586 {
587 wxTextFile file( rulesFile.GetFullPath() );
588
589 if( file.Open() )
590 {
591 for ( wxString str = file.GetFirstLine(); !file.Eof(); str = file.GetNextLine() )
592 {
594 m_textEditor->AddText( str << '\n' );
595 }
596
597 m_textEditor->EmptyUndoBuffer();
598
599 wxCommandEvent dummy;
600 OnCompile( dummy );
601 }
602 }
603
604 m_originalText = m_textEditor->GetText();
605
606 if( m_frame->Prj().IsNullProject() )
607 {
608 m_textEditor->ClearAll();
609 m_textEditor->AddText( _( "Design rules cannot be added without a project" ) );
610 m_textEditor->Disable();
611 }
612
613 return true;
614}
615
616
618{
619 if( m_originalText == m_textEditor->GetText() )
620 return true;
621
622 if( m_frame->Prj().IsNullProject() )
623 return true;
624
625 wxString rulesFilepath = m_frame->GetDesignRulesPath();
626
627 try
628 {
629 if( m_textEditor->SaveFile( rulesFilepath ) )
630 {
631 m_frame->GetBoard()->GetDesignSettings().m_DRCEngine->InitEngine( rulesFilepath );
632 return true;
633 }
634 }
635 catch( PARSE_ERROR& )
636 {
637 // Don't lock them in to the Setup dialog if they have bad rules. They've already
638 // saved them so we can allow an exit.
639 return true;
640 }
641
642 return false;
643}
644
645
646void PANEL_SETUP_RULES::OnSyntaxHelp( wxHyperlinkEvent& aEvent )
647{
648 if( m_helpWindow )
649 {
651 return;
652 }
653
654 wxString msg =
656 ;
657
658#ifdef __WXMAC__
659 msg.Replace( wxT( "Ctrl+" ), wxT( "Cmd+" ) );
660#endif
661
662 m_helpWindow = new HTML_MESSAGE_BOX( nullptr, _( "Syntax Help" ) );
663 m_helpWindow->SetDialogSizeInDU( 320, 320 );
664
665 wxString html_txt;
666 ConvertMarkdown2Html( wxGetTranslation( msg ), html_txt );
667 m_helpWindow->AddHTML_Text( html_txt );
668
670}
const char * name
Definition: DXF_plotter.cpp:56
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
Container for design settings for a BOARD object.
std::shared_ptr< NET_SETTINGS > m_NetSettings
std::shared_ptr< DRC_ENGINE > m_DRCEngine
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
std::set< wxString > GetNetClassAssignmentCandidates() const
Return the set of netname candidates for netclass assignment.
Definition: board.cpp:1462
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:643
void Parse(std::vector< std::shared_ptr< DRC_RULE > > &aRules, REPORTER *aReporter)
void SetDialogSizeInDU(int aWidth, int aHeight)
Set the dialog size, using a "logical" value.
void AddHTML_Text(const wxString &message)
Add HTML text (without any change) to message list.
void ShowModeless()
Show a modeless version of the dialog (without an OK button).
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
void SetModified()
Definition: paged_dialog.h:41
Class PANEL_SETUP_RULES_BASE.
wxStyledTextCtrl * m_textEditor
WX_HTML_REPORT_BOX * m_errorsReport
wxBitmapButton * m_compileButton
bool TransferDataToWindow() override
void OnErrorLinkClicked(wxHtmlLinkEvent &event) override
PANEL_SETUP_RULES(PAGED_DIALOG *aParent, PCB_EDIT_FRAME *aFrame)
PAGED_DIALOG * m_Parent
void onScintillaCharAdded(wxStyledTextEvent &aEvent)
PCB_EDIT_FRAME * m_frame
void OnContextMenu(wxMouseEvent &event) override
~PANEL_SETUP_RULES() override
HTML_MESSAGE_BOX * m_helpWindow
void OnCompile(wxCommandEvent &event) override
bool TransferDataFromWindow() override
void OnSyntaxHelp(wxHyperlinkEvent &aEvent) override
void onCharHook(wxKeyEvent &aEvent)
SCINTILLA_TRICKS * m_scintillaTricks
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
BOARD * GetBoard() const
The main frame for Pcbnew.
const wxArrayString GetSignatures() const
static PCB_EXPR_BUILTIN_FUNCTIONS & Instance()
virtual bool IsNullProject() const
Check if this project is a null project (i.e.
Definition: project.cpp:138
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:67
CLASSES_INFO GetAllClasses()
const PROPERTY_LIST & GetProperties(TYPE_ID aType) const
Return all properties for a specific type.
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:69
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
void DoAutocomplete(const wxString &aPartial, const wxArrayString &aTokens)
void Clear()
Delete the stored messages.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
void Flush()
Build the HTML messages page.
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:342
This file is part of the common library.
#define _(s)
see class PGM_BASE
std::vector< PROPERTY_BASE * > PROPERTY_LIST
Definition: property_mgr.h:46
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
@ RPT_SEVERITY_ERROR
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:111
std::vector< FAB_LAYER_COLOR > dummy
bool ConvertSmartQuotesAndDashes(wxString *aString)
Convert curly quotes and em/en dashes to straight quotes and dashes.
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.
void ConvertMarkdown2Html(const wxString &aMarkdownInput, wxString &aHtmlOutput)
A filename or source description, a problem input line, a line number, a byte offset,...
Definition: ki_exception.h:119
int lineNumber
at which line number, 1 based index.
Definition: ki_exception.h:120
const wxString ParseProblem()
Definition: ki_exception.h:150
int byteIndex
at which byte offset within the line, 1 based index
Definition: ki_exception.h:121