fsprojects / FsLexYacc

Lexer and parser generators for F#
http://fsprojects.github.io/FsLexYacc/
MIT License
203 stars 68 forks source link

update docs: 'lexbuf' to 'LexBuffer' #131

Closed thautwarm closed 3 years ago

thautwarm commented 3 years ago

At https://fsprojects.github.io/FsLexYacc/fsyacc.html

You must set the initial position when you create the lexbuf:

let setInitialPos (lexbuf:lexbuf) filename =
    lexbuf.EndPos <- { pos_bol = 0;
                       pos_fname=filename;
                       pos_cnum=0;
                       pos_lnum=1 }

This is out-of-date and misleading to users, and shall update to

let setInitialPos (lexbuf: LexBuffer<_>) filename =
    lexbuf.EndPos <- { pos_bol = 0;
                       pos_fname=filename;
                       pos_cnum=0;
                       pos_lnum=1 }