Giter Site home page Giter Site logo

fsyaml's Introduction

Hi there 👋

fsyaml's People

Contributors

bleis-tift avatar fbehrens avatar hafuu avatar krzysztof-cieslak avatar vain0x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fsyaml's Issues

Parserの階層化

  • pyaml*
  • pfs*

の2つに分けるパターンと

AST導入

の2パターンを試して、分かりやすい方を採用する。

YamlDotNetの最新版(3.8)を使うとdumpした文字列に謎の数字が入る

Assertion Violated: オブジェクトをYamlの文字列にできる
 1. Expect: "FieldA:
    - 1
    - 2
    - 3
    FieldB:
      1: 2
      100: 200
      200: 400
      500: 1000
    FieldC: "abc\r\ndef"
    FieldD:
      FieldA: []
      FieldB:
        400: 200
        500: 250
      FieldC: "abcdefghijk"
      FieldD: null
    "
    Actual: "&1003054072 FieldA:
    - &938613474 1
    - &80681582 2
    - 3
    &246422342 FieldB:
      1: 2
      100: &719991411 200
      200: &916642585 400
      &1731350501 500: 1000
    &245903467 FieldC: "abc\r\ndef"
    &1224614361 FieldD:
      FieldA: []
      FieldB:
        400: 200
        500: 250
      FieldC: "abcdefghijk"
      FieldD: null
    "

開発で使用していた3.5.1では発生しない

フィールドの型から判別共用体のケースを推論する

[<値の型が違えば名前は省略できる属性>]
type t = Hoge of int | Piyo of string
- 1      # Hoge
- "piyo" # Piyo

[<値の型が違えば名前は省略できる属性>]
// 要素の順番で解決する
type t = Hoge of int * string | Piyo of string list
- [ 1, "hoge" ]   # Hoge
- [ "2", "piyo" ] # Piyo

[<値の型が違えば名前は省略できる属性>]
type t = Hoge of int * string | Piyo of int * int * int
- [ 1, "hoge" ] # Hoge
- [ 1, 2, 3 ]   # Piyo

[<値の型が違えば名前は省略できる属性>]
type t = Hoge of int list | Piyo of string list
- [ 1, 2, 3 ]
- [ "a", "b", "c" ]

タプルを扱えるようにする

出来ればScalar Typeとしてやりたい。カッコで囲んだカンマ区切り形式が今のところよさそう?
あと、判別共用体周りも似たような感じにできれば、より手軽に使えそう。

Misguiding name of test method

In file FsYaml/FsYaml.Tests/YamlScenario.fs at line 53 method name

[ 10 ,2,3 ]というYAML文字列を[1; 2; 3]に変換できる
should be
[ 10 ,2,3 ]というYAML文字列を[10; 2; 3]に変換できる

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.