~sbinet/star-tex

star-tex/kpath/config.go -rw-r--r-- 587 bytes
9bb27e8aSebastien Binet ci: bump to freebsd/latest 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright ©2021 The star-tex Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package kpath

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
)

func parseConfig(r io.Reader) (Context, error) {
	sc := bufio.NewScanner(r)
	for sc.Scan() {
		raw := bytes.TrimSpace(sc.Bytes())
		if len(raw) == 0 {
			continue
		}
		if raw[0] == '%' {
			continue
		}
	}

	err := sc.Err()
	if err != nil && err != io.EOF {
		return Context{}, fmt.Errorf("could not scan config file: %w", err)
	}

	panic("not implemented")
}