import Immutable from "immutable" ; import Token from "./token" ; import BLOCKS from "../constants/blocks" ; const Content = Immutable . Record ( { syntax : String ( ) , token : Token . create ( BLOCKS . DOCUMENT ) , } ) ; Content . prototype . getSyntax = function ( ) { return this . get ( "syntax" ) ; } ; Content . prototype . getToken = function ( ) { return this . get ( "token" ) ; } ; param { Syntax } syntax param { Token } return { Content } Content . createFromToken = function ( syntax , token ) { return new Content ( { syntax : syntax , token : token , } ) ; } ; export default Content ;